aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/logger/system.h
diff options
context:
space:
mode:
authorAndrey Fomichev <andrey.fomichev@gmail.com>2022-02-10 16:49:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:15 +0300
commit1c61afbf3db63940d05e6fefa3104b03457788a1 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/logger/system.h
parente542cc14db4240643a06bb0dde87ecf361f101ab (diff)
downloadydb-1c61afbf3db63940d05e6fefa3104b03457788a1.tar.gz
Restoring authorship annotation for Andrey Fomichev <andrey.fomichev@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/logger/system.h')
-rw-r--r--library/cpp/logger/system.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/library/cpp/logger/system.h b/library/cpp/logger/system.h
index 9c7c142907..b8c60b3023 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)