aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/logger/global
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:15 +0300
commit72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch)
treeda2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/logger/global
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/logger/global')
-rw-r--r--library/cpp/logger/global/common.h8
-rw-r--r--library/cpp/logger/global/global.cpp4
-rw-r--r--library/cpp/logger/global/global.h10
-rw-r--r--library/cpp/logger/global/rty_formater.cpp4
-rw-r--r--library/cpp/logger/global/rty_formater.h2
-rw-r--r--library/cpp/logger/global/rty_formater_ut.cpp2
6 files changed, 15 insertions, 15 deletions
diff --git a/library/cpp/logger/global/common.h b/library/cpp/logger/global/common.h
index 7dcf650dec..0f5b9893c6 100644
--- a/library/cpp/logger/global/common.h
+++ b/library/cpp/logger/global/common.h
@@ -36,7 +36,7 @@ namespace NLoggingImpl {
public:
inline static bool Usage() {
return SingletonWithPriority<TPtr, SingletonPriority>()->Instance.Get();
- }
+ }
inline static T* Get() {
return SingletonWithPriority<TPtr, SingletonPriority>()->Instance.Get();
@@ -139,11 +139,11 @@ namespace NPrivateGlobalLogger {
return true;
}
};
-}
+}
#define LOGGER_GENERIC_LOG_CHECKED(logger, preprocessor, level, message) (*GetLoggerForce<preprocessor>(logger, TLogRecordContext(__LOCATION__, message, level)))
-#define LOGGER_CHECKED_GENERIC_LOG(logger, preprocessor, level, message) \
- (preprocessor::CheckLoggingContext(logger, TLogRecordContext(__LOCATION__, message, level))) && NPrivateGlobalLogger::TEatStream() | (*(preprocessor::StartRecord(logger, TLogRecordContext(__LOCATION__, message, level), nullptr)))
+#define LOGGER_CHECKED_GENERIC_LOG(logger, preprocessor, level, message) \
+ (preprocessor::CheckLoggingContext(logger, TLogRecordContext(__LOCATION__, message, level))) && NPrivateGlobalLogger::TEatStream() | (*(preprocessor::StartRecord(logger, TLogRecordContext(__LOCATION__, message, level), nullptr)))
#define SINGLETON_GENERIC_LOG_CHECKED(type, preprocessor, level, message) LOGGER_GENERIC_LOG_CHECKED(TLoggerOperator<type>::Log(), preprocessor, level, message)
#define SINGLETON_CHECKED_GENERIC_LOG(type, preprocessor, level, message) LOGGER_CHECKED_GENERIC_LOG(TLoggerOperator<type>::Log(), preprocessor, level, message)
diff --git a/library/cpp/logger/global/global.cpp b/library/cpp/logger/global/global.cpp
index 9fbd10f666..d871fcd350 100644
--- a/library/cpp/logger/global/global.cpp
+++ b/library/cpp/logger/global/global.cpp
@@ -26,12 +26,12 @@ bool GlobalLogInitialized() {
return TLoggerOperator<TGlobalLog>::Usage();
}
-template <>
+template <>
TGlobalLog* CreateDefaultLogger<TGlobalLog>() {
return new TGlobalLog("console", TLOG_INFO);
}
-template <>
+template <>
TNullLog* CreateDefaultLogger<TNullLog>() {
return new TNullLog("null");
}
diff --git a/library/cpp/logger/global/global.h b/library/cpp/logger/global/global.h
index cbe71b16ea..0613709ff0 100644
--- a/library/cpp/logger/global/global.h
+++ b/library/cpp/logger/global/global.h
@@ -30,7 +30,7 @@ public:
}
};
-template <>
+template <>
TGlobalLog* CreateDefaultLogger<TGlobalLog>();
class TNullLog: public TLog {
@@ -46,7 +46,7 @@ public:
}
};
-template <>
+template <>
TNullLog* CreateDefaultLogger<TNullLog>();
template <>
@@ -79,9 +79,9 @@ public:
#define VERIFY_WITH_LOG(expr, msg, ...) \
do { \
- if (Y_UNLIKELY(!(expr))) { \
+ if (Y_UNLIKELY(!(expr))) { \
FATAL_LOG << Sprintf(msg, ##__VA_ARGS__) << Endl; \
- Y_VERIFY(false, msg, ##__VA_ARGS__); \
+ Y_VERIFY(false, msg, ##__VA_ARGS__); \
}; \
} while (0);
@@ -90,7 +90,7 @@ namespace NPrivateGlobalLogger {
public:
~TVerifyEvent();
template <class T>
- inline TVerifyEvent& operator<<(const T& t) {
+ inline TVerifyEvent& operator<<(const T& t) {
static_cast<IOutputStream&>(*this) << t;
return *this;
diff --git a/library/cpp/logger/global/rty_formater.cpp b/library/cpp/logger/global/rty_formater.cpp
index 305f8470c5..c7799280bd 100644
--- a/library/cpp/logger/global/rty_formater.cpp
+++ b/library/cpp/logger/global/rty_formater.cpp
@@ -18,7 +18,7 @@ namespace {
instant.LocalTime(&tm);
// both stftime and sprintf exclude the terminating null byte from the return value
- char* pos = begin;
+ char* pos = begin;
pos += strftime(pos, end - pos, "%Y-%m-%d %H:%M:%S.", &tm);
pos += sprintf(pos, "%03" PRIu32, instant.MilliSecondsOfSecond());
pos += strftime(pos, end - pos, " %z", &tm);
@@ -28,7 +28,7 @@ namespace {
}
namespace NLoggingImpl {
- IOutputStream& operator<<(IOutputStream& out, TLocalTimeS localTimeS) {
+ IOutputStream& operator<<(IOutputStream& out, TLocalTimeS localTimeS) {
char buffer[LocalTimeSBufferSize];
size_t len = PrintLocalTimeS(localTimeS.GetInstant(), buffer, buffer + sizeof(buffer));
out.Write(buffer, len);
diff --git a/library/cpp/logger/global/rty_formater.h b/library/cpp/logger/global/rty_formater.h
index 6532e1d769..cf58bb7949 100644
--- a/library/cpp/logger/global/rty_formater.h
+++ b/library/cpp/logger/global/rty_formater.h
@@ -1,5 +1,5 @@
#pragma once
-
+
#include "common.h"
namespace NMemInfo {
diff --git a/library/cpp/logger/global/rty_formater_ut.cpp b/library/cpp/logger/global/rty_formater_ut.cpp
index 551a97c5bf..c5d4461ae7 100644
--- a/library/cpp/logger/global/rty_formater_ut.cpp
+++ b/library/cpp/logger/global/rty_formater_ut.cpp
@@ -26,6 +26,6 @@ Y_UNIT_TEST_SUITE(NLoggingImplTest) {
Y_UNIT_TEST(TestTLocalTimeSAddRight) {
NLoggingImpl::TLocalTimeS lt(TInstant::ParseIso8601Deprecated(SampleISO8601));
TString prefix("prefix");
- UNIT_ASSERT_EQUAL(prefix + lt, prefix + SampleRtyLog);
+ UNIT_ASSERT_EQUAL(prefix + lt, prefix + SampleRtyLog);
}
}