aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/logger/rotating_file_creator.h
blob: b2e94584da5ccffe68ae79c82278755f46a47953 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#pragma once

#include "file_creator.h"

class TRotatingFileLogBackendCreator : public TFileLogBackendCreator {
public:
    TRotatingFileLogBackendCreator();
    virtual bool Init(const IInitContext& ctx) override;
    static TFactory::TRegistrator<TRotatingFileLogBackendCreator> Registrar;

protected:
    virtual void DoToJson(NJson::TJsonValue& value) const override;

private:
    virtual THolder<TLogBackend> DoCreateLogBackend() const override;
    ui64 MaxSizeBytes = Max<ui64>();
    ui64 RotatedFilesCount = Max<ui64>();
};