rotating_file.h 567 B

1234567891011121314151617181920
  1. #pragma once
  2. #include "backend.h"
  3. #include <util/generic/fwd.h>
  4. #include <util/generic/ptr.h>
  5. class TRotatingFileLogBackend: public TLogBackend {
  6. public:
  7. TRotatingFileLogBackend(const TString& preRotatePath, const TString& postRotatePath, const ui64 maxSizeBytes);
  8. TRotatingFileLogBackend(const TString& path, const ui64 maxSizeBytes, const ui32 rotatedFilesCount);
  9. ~TRotatingFileLogBackend() override;
  10. void WriteData(const TLogRecord& rec) override;
  11. void ReopenLog() override;
  12. private:
  13. class TImpl;
  14. TAtomicSharedPtr<TImpl> Impl_;
  15. };