diff options
author | Andrey Fomichev <andrey.fomichev@gmail.com> | 2022-02-10 16:49:12 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:12 +0300 |
commit | e542cc14db4240643a06bb0dde87ecf361f101ab (patch) | |
tree | 3b03a4b94acd11a4eca042532035806e5fa08ad1 /library/cpp/logger/system.h | |
parent | e2ac73225f30f7fcf7df3cb225cba257f56144c1 (diff) | |
download | ydb-e542cc14db4240643a06bb0dde87ecf361f101ab.tar.gz |
Restoring authorship annotation for Andrey Fomichev <andrey.fomichev@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/logger/system.h')
-rw-r--r-- | library/cpp/logger/system.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/library/cpp/logger/system.h b/library/cpp/logger/system.h index b8c60b3023..9c7c142907 100644 --- a/library/cpp/logger/system.h +++ b/library/cpp/logger/system.h @@ -12,10 +12,10 @@ (ident) ? (TLogBackend*)(new TSysLogBackend((ident), (facility), (flags))) : (TLogBackend*)(new TNullLogBackend())));\ } \ } Y_CAT(loginit, __LINE__); - + #define YSYSLOGINIT(ident, facility) YSYSLOGINIT_FLAGS((ident), (facility), 0) - -class TSysLogBackend: public TLogBackend { + +class TSysLogBackend: public TLogBackend { public: enum EFacility { TSYSLOG_LOCAL0 = 0, @@ -27,7 +27,7 @@ public: TSYSLOG_LOCAL6 = 6, TSYSLOG_LOCAL7 = 7 }; - + enum EFlags { LogPerror = 1, LogCons = 2 @@ -35,30 +35,30 @@ public: TSysLogBackend(const char* ident, EFacility facility, int flags = 0); ~TSysLogBackend() override; - + void WriteData(const TLogRecord& rec) override; void ReopenLog() override; - + virtual TString GetIdent() const { return Ident; } - + virtual EFacility GetFacility() const { return Facility; } - + virtual int GetFlags() const { return Flags; } - + protected: int ELogPriority2SyslogPriority(ELogPriority priority); - + TString Ident; EFacility Facility; int Flags; -}; - +}; + /* * return system-wide logger instance * better do not use in real programs(instead of robot, of course) |