diff options
| author | whatsername <[email protected]> | 2024-07-15 22:46:57 +0300 |
|---|---|---|
| committer | whatsername <[email protected]> | 2024-07-15 22:58:06 +0300 |
| commit | 6e7ddec83991f734749824466ba89e35fff8904c (patch) | |
| tree | efb71ba710bc5fa0d9f0becde73dea092d9022bd /yt/cpp/mapreduce/client/init.cpp | |
| parent | 61e081f1cbcf1492678dc056c3d63cc847d029bc (diff) | |
YT-22268: Support YT_LOG_PATH in c++ api
Проверил руками на тестах yt roren
eb7589ac6894bffb1ebcd1d092f4eed6ca4cd975
Diffstat (limited to 'yt/cpp/mapreduce/client/init.cpp')
| -rw-r--r-- | yt/cpp/mapreduce/client/init.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/yt/cpp/mapreduce/client/init.cpp b/yt/cpp/mapreduce/client/init.cpp index c74598ba14b..f05888befb1 100644 --- a/yt/cpp/mapreduce/client/init.cpp +++ b/yt/cpp/mapreduce/client/init.cpp @@ -158,7 +158,9 @@ void CommonInitialize(int argc, const char** argv) exit(1); } - SetLogger(CreateStdErrLogger(logLevel)); + auto logPath = TConfig::Get()->LogPath; + auto logger = logPath.Empty() ? CreateStdErrLogger(logLevel) : CreateFileLogger(logLevel, logPath); + SetLogger(logger); TProcessState::Get()->SetCommandLine(argc, argv); } |
