diff options
author | Andrey Fomichev <andrey.fomichev@gmail.com> | 2022-02-10 16:49:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:15 +0300 |
commit | 1c61afbf3db63940d05e6fefa3104b03457788a1 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/logger/system.cpp | |
parent | e542cc14db4240643a06bb0dde87ecf361f101ab (diff) | |
download | ydb-1c61afbf3db63940d05e6fefa3104b03457788a1.tar.gz |
Restoring authorship annotation for Andrey Fomichev <andrey.fomichev@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/logger/system.cpp')
-rw-r--r-- | library/cpp/logger/system.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/library/cpp/logger/system.cpp b/library/cpp/logger/system.cpp index f2b58fcc82..42233f63d2 100644 --- a/library/cpp/logger/system.cpp +++ b/library/cpp/logger/system.cpp @@ -14,11 +14,11 @@ #include "record.h" #include "stream.h" -TSysLogBackend::TSysLogBackend(const char* ident, EFacility facility, int flags) - : Ident(ident) - , Facility(facility) - , Flags(flags) -{ +TSysLogBackend::TSysLogBackend(const char* ident, EFacility facility, int flags) + : Ident(ident) + , Facility(facility) + , Flags(flags) +{ #if defined(_unix_) Y_ASSERT(TSYSLOG_LOCAL0 <= facility && facility <= TSYSLOG_LOCAL7); @@ -43,34 +43,34 @@ TSysLogBackend::TSysLogBackend(const char* ident, EFacility facility, int flags) } openlog(Ident.data(), sysflags, f2sf[(size_t)facility]); -#endif -} - +#endif +} + TSysLogBackend::~TSysLogBackend() { #if defined(_unix_) - closelog(); -#endif -} - + closelog(); +#endif +} + void TSysLogBackend::WriteData(const TLogRecord& rec) { #if defined(_unix_) syslog(ELogPriority2SyslogPriority(rec.Priority), "%.*s", (int)rec.Len, rec.Data); #else Y_UNUSED(rec); -#endif -} - -void TSysLogBackend::ReopenLog() { -} - +#endif +} + +void TSysLogBackend::ReopenLog() { +} + int TSysLogBackend::ELogPriority2SyslogPriority(ELogPriority priority) { #if defined(_unix_) return Min(int(priority), (int)LOG_PRIMASK); #else - // trivial conversion - return int(priority); + // trivial conversion + return int(priority); #endif -} +} namespace { class TSysLogInstance: public TLog { |