Skip to content

Commit f6a7f46

Browse files
author
hiddenpath
committed
YT-23645: Do not override user configuration of logger
commit_hash:a4522facabf7d730438dfc794abddedb0838d79e
1 parent 435bb5a commit f6a7f46

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

yt/cpp/mapreduce/client/init.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,15 @@ void CommonInitialize(TGuard<TMutex>& g)
180180
auto logPath = TConfig::Get()->LogPath;
181181
if (logPath.empty()) {
182182
if (TConfig::Get()->LogUseCore) {
183+
SetUseCoreLog();
184+
if (!NLogging::TLogManager::Get()->IsDefaultConfigured()) {
185+
return;
186+
}
183187
auto coreLoggingConfig = NLogging::TLogManagerConfig::CreateStderrLogger(ToCoreLogLevel(logLevel));
184188
for (const auto& rule : coreLoggingConfig->Rules) {
185189
rule->ExcludeCategories = TConfig::Get()->LogExcludeCategories;
186190
}
187191
NLogging::TLogManager::Get()->Configure(coreLoggingConfig);
188-
SetUseCoreLog();
189192
} else {
190193
auto logger = CreateStdErrLogger(logLevel);
191194
SetLogger(logger);

0 commit comments

Comments
 (0)