diff options
Diffstat (limited to 'library/cpp')
| -rw-r--r-- | library/cpp/tld/tlds-alpha-by-domain.txt | 3 | ||||
| -rw-r--r-- | library/cpp/yt/error/error_code.cpp | 30 | ||||
| -rw-r--r-- | library/cpp/yt/logging/backends/stream/unittests/stream_log_manager_ut.cpp | 2 | ||||
| -rw-r--r-- | library/cpp/yt/logging/logger.h | 24 |
4 files changed, 29 insertions, 30 deletions
diff --git a/library/cpp/tld/tlds-alpha-by-domain.txt b/library/cpp/tld/tlds-alpha-by-domain.txt index d14bb7480c9..250d46a816d 100644 --- a/library/cpp/tld/tlds-alpha-by-domain.txt +++ b/library/cpp/tld/tlds-alpha-by-domain.txt @@ -1,4 +1,4 @@ -# Version 2026062302, Last Updated Wed Jun 24 07:07:01 2026 UTC +# Version 2026072401, Last Updated Fri Jul 24 18:55:10 2026 UTC AAA AARP ABB @@ -1233,6 +1233,7 @@ WATCH WATCHES WEATHER WEATHERCHANNEL +WEB WEBCAM WEBER WEBSITE diff --git a/library/cpp/yt/error/error_code.cpp b/library/cpp/yt/error/error_code.cpp index d82d03214d4..ef9ce0f33c1 100644 --- a/library/cpp/yt/error/error_code.cpp +++ b/library/cpp/yt/error/error_code.cpp @@ -62,11 +62,10 @@ void TErrorCodeRegistry::RegisterErrorCode(int code, const TErrorCodeInfo& error if (code == 119) { return; } - YT_LOG_FATAL( - "Duplicate error code (Code: %v, StoredCodeInfo: %v, NewCodeInfo: %v)", - code, - CodeToInfo_[code], - errorCodeInfo); + YT_TLOG_FATAL("Duplicate error code") + .With("Code", code) + .With("StoredCodeInfo", CodeToInfo_[code]) + .With("NewCodeInfo", errorCodeInfo); } } @@ -91,11 +90,11 @@ void TErrorCodeRegistry::RegisterErrorCodeRange(int from, int to, std::string na TErrorCodeRangeInfo newRange{from, to, std::move(namespaceName), std::move(formatter)}; for (const auto& range : ErrorCodeRanges_) { - YT_LOG_FATAL_IF( + YT_TLOG_FATAL_IF( range.Intersects(newRange), - "Intersecting error code ranges registered (FirstRange: %v, SecondRange: %v)", - range, - newRange); + "Intersecting error code ranges registered") + .With("FirstRange", range) + .With("SecondRange", newRange); } ErrorCodeRanges_.push_back(std::move(newRange)); CheckCodesAgainstRanges(); @@ -105,14 +104,13 @@ void TErrorCodeRegistry::CheckCodesAgainstRanges() const { for (const auto& [code, info] : CodeToInfo_) { for (const auto& range : ErrorCodeRanges_) { - YT_LOG_FATAL_IF( + YT_TLOG_FATAL_IF( range.Contains(code), - "Error code range contains another registered code " - "(Range: %v, Code: %v, RangeCodeInfo: %v, StandaloneCodeInfo: %v)", - range, - code, - range.Get(code), - info); + "Error code range contains another registered code") + .With("Range", range) + .With("Code", code) + .With("RangeCodeInfo", range.Get(code)) + .With("StandaloneCodeInfo", info); } } } diff --git a/library/cpp/yt/logging/backends/stream/unittests/stream_log_manager_ut.cpp b/library/cpp/yt/logging/backends/stream/unittests/stream_log_manager_ut.cpp index cb3e244e3b9..95b2ade9b65 100644 --- a/library/cpp/yt/logging/backends/stream/unittests/stream_log_manager_ut.cpp +++ b/library/cpp/yt/logging/backends/stream/unittests/stream_log_manager_ut.cpp @@ -20,7 +20,7 @@ TEST(TStreamLogManagerTest, Simple) TStringOutput output(str); auto logManager = CreateStreamLogManager(&output); TLogger Logger(logManager.get(), "Test"); - YT_LOG_INFO("Hello world"); + YT_TLOG_INFO("Hello world"); } TVector<TStringBuf> tokens; diff --git a/library/cpp/yt/logging/logger.h b/library/cpp/yt/logging/logger.h index 0f29b6f7376..2e832995016 100644 --- a/library/cpp/yt/logging/logger.h +++ b/library/cpp/yt/logging/logger.h @@ -502,8 +502,8 @@ void LogStructuredEvent( #ifdef YT_ENABLE_TRACE_LOGGING #define YT_TLOG_TRACE(message) YT_TLOG_EVENT_FLUENT(Logger, ::NYT::NLogging::ELogLevel::Trace, message) -#define YT_TLOG_TRACE_IF(condition, message) if (condition) YT_TLOG_TRACE(message) -#define YT_TLOG_TRACE_UNLESS(condition, message) if (!(condition)) YT_TLOG_TRACE(message) +#define YT_TLOG_TRACE_IF(condition, message) if (!(condition)) { } else YT_TLOG_TRACE(message) +#define YT_TLOG_TRACE_UNLESS(condition, message) if (condition) { } else YT_TLOG_TRACE(message) #else #define YT_TLOG_UNUSED(message) if (true) { } else ::NYT::NLogging::NDetail::MakeNullTaggedLoggingGuard(message) #define YT_TLOG_TRACE(message) YT_TLOG_UNUSED(message) @@ -512,24 +512,24 @@ void LogStructuredEvent( #endif #define YT_TLOG_DEBUG(message) YT_TLOG_EVENT_FLUENT(Logger, ::NYT::NLogging::ELogLevel::Debug, message) -#define YT_TLOG_DEBUG_IF(condition, message) if (condition) YT_TLOG_DEBUG(message) -#define YT_TLOG_DEBUG_UNLESS(condition, message) if (!(condition)) YT_TLOG_DEBUG(message) +#define YT_TLOG_DEBUG_IF(condition, message) if (!(condition)) { } else YT_TLOG_DEBUG(message) +#define YT_TLOG_DEBUG_UNLESS(condition, message) if (condition) { } else YT_TLOG_DEBUG(message) #define YT_TLOG_INFO(message) YT_TLOG_EVENT_FLUENT(Logger, ::NYT::NLogging::ELogLevel::Info, message) -#define YT_TLOG_INFO_IF(condition, message) if (condition) YT_TLOG_INFO(message) -#define YT_TLOG_INFO_UNLESS(condition, message) if (!(condition)) YT_TLOG_INFO(message) +#define YT_TLOG_INFO_IF(condition, message) if (!(condition)) { } else YT_TLOG_INFO(message) +#define YT_TLOG_INFO_UNLESS(condition, message) if (condition) { } else YT_TLOG_INFO(message) #define YT_TLOG_WARNING(message) YT_TLOG_EVENT_FLUENT(Logger, ::NYT::NLogging::ELogLevel::Warning, message) -#define YT_TLOG_WARNING_IF(condition, message) if (condition) YT_TLOG_WARNING(message) -#define YT_TLOG_WARNING_UNLESS(condition, message) if (!(condition)) YT_TLOG_WARNING(message) +#define YT_TLOG_WARNING_IF(condition, message) if (!(condition)) { } else YT_TLOG_WARNING(message) +#define YT_TLOG_WARNING_UNLESS(condition, message) if (condition) { } else YT_TLOG_WARNING(message) #define YT_TLOG_ERROR(message) YT_TLOG_EVENT_FLUENT(Logger, ::NYT::NLogging::ELogLevel::Error, message) -#define YT_TLOG_ERROR_IF(condition, message) if (condition) YT_TLOG_ERROR(message) -#define YT_TLOG_ERROR_UNLESS(condition, message) if (!(condition)) YT_TLOG_ERROR(message) +#define YT_TLOG_ERROR_IF(condition, message) if (!(condition)) { } else YT_TLOG_ERROR(message) +#define YT_TLOG_ERROR_UNLESS(condition, message) if (condition) { } else YT_TLOG_ERROR(message) #define YT_TLOG_ALERT(message) YT_TLOG_EVENT_FLUENT(Logger, ::NYT::NLogging::ELogLevel::Alert, message) -#define YT_TLOG_ALERT_IF(condition, message) if (condition) YT_TLOG_ALERT(message) -#define YT_TLOG_ALERT_UNLESS(condition, message) if (!(condition)) YT_TLOG_ALERT(message) +#define YT_TLOG_ALERT_IF(condition, message) if (!(condition)) { } else YT_TLOG_ALERT(message) +#define YT_TLOG_ALERT_UNLESS(condition, message) if (condition) { } else YT_TLOG_ALERT(message) // The terminal action of |YT_TLOG_FATAL|/|YT_TLOG_ALERT_AND_THROW| (aborting or throwing) // must run *after* the |.With| chain, which the user appends to the macro. A guard cannot |
