aboutsummaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorivanfefer <ivanfefer@yandex-team.ru>2022-02-10 16:50:13 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:13 +0300
commit9f848110233b3807d5dd3ae5479b3957d791892c (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library
parent15ab2cc1596afd590aac55ef0aab6593ca64df74 (diff)
downloadydb-9f848110233b3807d5dd3ae5479b3957d791892c.tar.gz
Restoring authorship annotation for <ivanfefer@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library')
-rw-r--r--library/cpp/logger/global/common.cpp8
-rw-r--r--library/cpp/logger/global/common.h34
-rw-r--r--library/cpp/logger/global/rty_formater.cpp8
-rw-r--r--library/cpp/logger/global/rty_formater.h2
4 files changed, 26 insertions, 26 deletions
diff --git a/library/cpp/logger/global/common.cpp b/library/cpp/logger/global/common.cpp
index b8ae53a883..4fb05c19b4 100644
--- a/library/cpp/logger/global/common.cpp
+++ b/library/cpp/logger/global/common.cpp
@@ -23,10 +23,10 @@ namespace NLoggingImpl {
}
}
-bool TLogFilter::CheckLoggingContext(TLog& log, const TLogRecordContext& context) {
- return context.Priority <= log.FiltrationLevel();
-}
-
+bool TLogFilter::CheckLoggingContext(TLog& log, const TLogRecordContext& context) {
+ return context.Priority <= log.FiltrationLevel();
+}
+
TSimpleSharedPtr<TLogElement> TLogFilter::StartRecord(TLog& logger, const TLogRecordContext& context, TSimpleSharedPtr<TLogElement> earlier) {
if (earlier)
return earlier;
diff --git a/library/cpp/logger/global/common.h b/library/cpp/logger/global/common.h
index 34c0d16659..7dcf650dec 100644
--- a/library/cpp/logger/global/common.h
+++ b/library/cpp/logger/global/common.h
@@ -94,12 +94,12 @@ struct TLogRecordPreprocessor;
template <>
struct TLogRecordPreprocessor<> {
- inline static bool CheckLoggingContext(TLog& /*log*/, const TLogRecordContext& /*context*/) {
- return true;
- }
-
+ inline static bool CheckLoggingContext(TLog& /*log*/, const TLogRecordContext& /*context*/) {
+ return true;
+ }
+
inline static TSimpleSharedPtr<TLogElement> StartRecord(TLog& log, const TLogRecordContext& context, TSimpleSharedPtr<TLogElement> earlier) {
- if (earlier)
+ if (earlier)
return earlier;
TSimpleSharedPtr<TLogElement> result(new TLogElement(&log));
*result << context.Priority;
@@ -109,10 +109,10 @@ struct TLogRecordPreprocessor<> {
template <class H, class... R>
struct TLogRecordPreprocessor<H, R...> {
- inline static bool CheckLoggingContext(TLog& log, const TLogRecordContext& context) {
- return H::CheckLoggingContext(log, context) && TLogRecordPreprocessor<R...>::CheckLoggingContext(log, context);
- }
-
+ inline static bool CheckLoggingContext(TLog& log, const TLogRecordContext& context) {
+ return H::CheckLoggingContext(log, context) && TLogRecordPreprocessor<R...>::CheckLoggingContext(log, context);
+ }
+
inline static TSimpleSharedPtr<TLogElement> StartRecord(TLog& log, const TLogRecordContext& context, TSimpleSharedPtr<TLogElement> earlier) {
TSimpleSharedPtr<TLogElement> first = H::StartRecord(log, context, earlier);
return TLogRecordPreprocessor<R...>::StartRecord(log, context, first);
@@ -120,8 +120,8 @@ struct TLogRecordPreprocessor<H, R...> {
};
struct TLogFilter {
- static bool CheckLoggingContext(TLog& log, const TLogRecordContext& context);
- static TSimpleSharedPtr<TLogElement> StartRecord(TLog& log, const TLogRecordContext& context, TSimpleSharedPtr<TLogElement> earlier);
+ static bool CheckLoggingContext(TLog& log, const TLogRecordContext& context);
+ static TSimpleSharedPtr<TLogElement> StartRecord(TLog& log, const TLogRecordContext& context, TSimpleSharedPtr<TLogElement> earlier);
};
class TNullLog;
@@ -133,14 +133,14 @@ TSimpleSharedPtr<TLogElement> GetLoggerForce(TLog& log, const TLogRecordContext&
return new TLogElement(&TLoggerOperator<TNullLog>::Log());
}
-namespace NPrivateGlobalLogger {
- struct TEatStream {
+namespace NPrivateGlobalLogger {
+ struct TEatStream {
Y_FORCE_INLINE bool operator|(const IOutputStream&) const {
- return true;
- }
- };
+ 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)))
diff --git a/library/cpp/logger/global/rty_formater.cpp b/library/cpp/logger/global/rty_formater.cpp
index 677931d478..305f8470c5 100644
--- a/library/cpp/logger/global/rty_formater.cpp
+++ b/library/cpp/logger/global/rty_formater.cpp
@@ -80,10 +80,10 @@ ILoggerFormatter* CreateRtyLoggerFormatter() {
return new TRtyLoggerFormatter();
}
-bool TRTYMessageFormater::CheckLoggingContext(TLog& /*logger*/, const TLogRecordContext& /*context*/) {
- return true;
-}
-
+bool TRTYMessageFormater::CheckLoggingContext(TLog& /*logger*/, const TLogRecordContext& /*context*/) {
+ return true;
+}
+
TSimpleSharedPtr<TLogElement> TRTYMessageFormater::StartRecord(TLog& logger, const TLogRecordContext& context, TSimpleSharedPtr<TLogElement> earlier) {
if (!earlier) {
earlier.Reset(new TLogElement(&logger));
diff --git a/library/cpp/logger/global/rty_formater.h b/library/cpp/logger/global/rty_formater.h
index cfdb71be1d..6532e1d769 100644
--- a/library/cpp/logger/global/rty_formater.h
+++ b/library/cpp/logger/global/rty_formater.h
@@ -54,7 +54,7 @@ class TLoggerFormatterOperator : public NLoggingImpl::TOperatorBase<ILoggerForma
};
struct TRTYMessageFormater {
- static bool CheckLoggingContext(TLog& logger, const TLogRecordContext& context);
+ static bool CheckLoggingContext(TLog& logger, const TLogRecordContext& context);
static TSimpleSharedPtr<TLogElement> StartRecord(TLog& logger, const TLogRecordContext& context, TSimpleSharedPtr<TLogElement> earlier);
};