aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/logger/rotating_file_creator.h
blob: ee2e7e6a6cf9d84b6aaf3a2ae114909c00da4bf8 (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>(); 
};