diff options
| author | hiddenpath <[email protected]> | 2025-04-22 14:13:21 +0300 |
|---|---|---|
| committer | hiddenpath <[email protected]> | 2025-04-22 14:30:59 +0300 |
| commit | f6a7f46f175645293ba8fa4651544a47179bc7a6 (patch) | |
| tree | 7c309884ed71d797827847e561dec6a10f779d38 /yt/cpp/mapreduce/client/init.cpp | |
| parent | 435bb5acdf99f5b9a9437ec27e8d40505291cb69 (diff) | |
YT-23645: Do not override user configuration of logger
commit_hash:a4522facabf7d730438dfc794abddedb0838d79e
Diffstat (limited to 'yt/cpp/mapreduce/client/init.cpp')
| -rw-r--r-- | yt/cpp/mapreduce/client/init.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/yt/cpp/mapreduce/client/init.cpp b/yt/cpp/mapreduce/client/init.cpp index e971c9ee0e8..2a4e8730309 100644 --- a/yt/cpp/mapreduce/client/init.cpp +++ b/yt/cpp/mapreduce/client/init.cpp @@ -180,12 +180,15 @@ void CommonInitialize(TGuard<TMutex>& g) auto logPath = TConfig::Get()->LogPath; if (logPath.empty()) { if (TConfig::Get()->LogUseCore) { + SetUseCoreLog(); + if (!NLogging::TLogManager::Get()->IsDefaultConfigured()) { + return; + } 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); SetLogger(logger); |
