blob: 6737ec379f22e6f2be7d07d9c51da1b9fff7318f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#pragma once
#include "public.h"
namespace NYT::NLogging {
////////////////////////////////////////////////////////////////////////////////
struct ILogWriter
: public virtual TRefCounted
{
virtual void Write(const TLogEvent& event) = 0;
virtual void Flush() = 0;
virtual void Reload() = 0;
virtual void SetRateLimit(std::optional<i64> limit) = 0;
virtual void SetCategoryRateLimits(const THashMap<TString, i64>& categoryRateLimits) = 0;
};
DEFINE_REFCOUNTED_TYPE(ILogWriter)
////////////////////////////////////////////////////////////////////////////////
struct IFileLogWriter
: public virtual ILogWriter
{
virtual const TString& GetFileName() const = 0;
virtual void CheckSpace(i64 minSpace) = 0;
};
DEFINE_REFCOUNTED_TYPE(IFileLogWriter)
////////////////////////////////////////////////////////////////////////////////
} // namespace NYT::NLogging
|