From effac041cef419e2d5347d7288e1156950df939b Mon Sep 17 00:00:00 2001 From: hiddenpath Date: Wed, 5 Mar 2025 10:27:23 +0300 Subject: YT-23616: Disable specific categories only when using CoreLog commit_hash:9334e3dd45a476ba93f6342efd5361002046d228 --- yt/cpp/mapreduce/client/init.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'yt/cpp/mapreduce/client/init.cpp') diff --git a/yt/cpp/mapreduce/client/init.cpp b/yt/cpp/mapreduce/client/init.cpp index 04c4a4f0071..e971c9ee0e8 100644 --- a/yt/cpp/mapreduce/client/init.cpp +++ b/yt/cpp/mapreduce/client/init.cpp @@ -179,13 +179,12 @@ void CommonInitialize(TGuard& g) auto logPath = TConfig::Get()->LogPath; if (logPath.empty()) { - auto coreLoggingConfig = NLogging::TLogManagerConfig::CreateStderrLogger(ToCoreLogLevel(logLevel)); - for (const auto& rule : coreLoggingConfig->Rules) { - rule->ExcludeCategories = TConfig::Get()->LogExcludeCategories; - } - NLogging::TLogManager::Get()->Configure(coreLoggingConfig); - if (TConfig::Get()->LogUseCore) { + auto coreLoggingConfig = NLogging::TLogManagerConfig::CreateStderrLogger(ToCoreLogLevel(logLevel)); + for (const auto& rule : coreLoggingConfig->Rules) { + rule->ExcludeCategories = TConfig::Get()->LogExcludeCategories; + } + NLogging::TLogManager::Get()->Configure(coreLoggingConfig); SetUseCoreLog(); } else { auto logger = CreateStdErrLogger(logLevel); -- cgit v1.3