aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/logger/global/rty_formater.cpp
diff options
context:
space:
mode:
authorbulatman <bulatman@yandex-team.ru>2022-02-10 16:45:50 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:50 +0300
commit6560e4993b14d193f8c879e33a3de5e5eba6e21d (patch)
treecfd2e2baa05c3196f2caacbb63c32e1df40bc3de /library/cpp/logger/global/rty_formater.cpp
parent7489e4682331202b9c7d863c0898eb83d7b12c2b (diff)
downloadydb-6560e4993b14d193f8c879e33a3de5e5eba6e21d.tar.gz
Restoring authorship annotation for <bulatman@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/logger/global/rty_formater.cpp')
-rw-r--r--library/cpp/logger/global/rty_formater.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/library/cpp/logger/global/rty_formater.cpp b/library/cpp/logger/global/rty_formater.cpp
index 305f8470c5..2b86b68a0e 100644
--- a/library/cpp/logger/global/rty_formater.cpp
+++ b/library/cpp/logger/global/rty_formater.cpp
@@ -62,33 +62,33 @@ namespace NLoggingImpl {
}
}
-namespace {
- class TRtyLoggerFormatter : public ILoggerFormatter {
- public:
- void Format(const TLogRecordContext& context, TLogElement& elem) const override {
- elem << context.CustomMessage << ": " << NLoggingImpl::GetLocalTimeS() << " "
- << NLoggingImpl::StripFileName(context.SourceLocation.File) << ":" << context.SourceLocation.Line;
- if (context.Priority > TLOG_RESOURCES && !ExitStarted()) {
- elem << NLoggingImpl::GetSystemResources();
- }
- elem << " ";
- }
- };
-}
-
-ILoggerFormatter* CreateRtyLoggerFormatter() {
- return new TRtyLoggerFormatter();
-}
-
+namespace {
+ class TRtyLoggerFormatter : public ILoggerFormatter {
+ public:
+ void Format(const TLogRecordContext& context, TLogElement& elem) const override {
+ elem << context.CustomMessage << ": " << NLoggingImpl::GetLocalTimeS() << " "
+ << NLoggingImpl::StripFileName(context.SourceLocation.File) << ":" << context.SourceLocation.Line;
+ if (context.Priority > TLOG_RESOURCES && !ExitStarted()) {
+ elem << NLoggingImpl::GetSystemResources();
+ }
+ elem << " ";
+ }
+ };
+}
+
+ILoggerFormatter* CreateRtyLoggerFormatter() {
+ return new TRtyLoggerFormatter();
+}
+
bool TRTYMessageFormater::CheckLoggingContext(TLog& /*logger*/, const TLogRecordContext& /*context*/) {
return true;
}
TSimpleSharedPtr<TLogElement> TRTYMessageFormater::StartRecord(TLog& logger, const TLogRecordContext& context, TSimpleSharedPtr<TLogElement> earlier) {
- if (!earlier) {
+ if (!earlier) {
earlier.Reset(new TLogElement(&logger));
- }
-
- TLoggerFormatterOperator::Get()->Format(context, *earlier);
+ }
+
+ TLoggerFormatterOperator::Get()->Format(context, *earlier);
return earlier;
}