diff options
author | hiddenpath <hiddenpath@yandex-team.com> | 2025-05-16 20:52:53 +0300 |
---|---|---|
committer | hiddenpath <hiddenpath@yandex-team.com> | 2025-05-16 21:18:10 +0300 |
commit | 2fce241a1198745a8de7dbfb9a1a42eeb86afae8 (patch) | |
tree | 0e3e3b83692c45e01a4617180045a1aa1ba0a25d | |
parent | d092180069f61f2c10e99f0c078ec0a4f2eeb8ac (diff) | |
download | ydb-2fce241a1198745a8de7dbfb9a1a42eeb86afae8.tar.gz |
YT-25059: Introduce log levels as constants
This pull request updates the log level setting mechanism within NYT::TConfig from a explicit string-based approach to an enum-like approach.
The modification changes assignment from `NYT::TConfig::Get()->LogLevel = "info";` to `NYT::TConfig::Get()->LogLevel = NYT::NLogLevel::Info;`
This minimizes typos and misconfigurations as well as aligns with planned removal of enum ELogLevel (for the sake yt/core migration).
commit_hash:cf8d9629e4cc27e6a44f089edfc4c158f11e4baf
-rw-r--r-- | yt/cpp/mapreduce/interface/config.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/yt/cpp/mapreduce/interface/config.h b/yt/cpp/mapreduce/interface/config.h index e2ef370b6de..9105a402858 100644 --- a/yt/cpp/mapreduce/interface/config.h +++ b/yt/cpp/mapreduce/interface/config.h @@ -17,6 +17,15 @@ namespace NYT { //////////////////////////////////////////////////////////////////////////////// +namespace NLogLevel { + inline constexpr std::string_view Fatal = "fatal"; + inline constexpr std::string_view Error = "error"; + inline constexpr std::string_view Info = "info"; + inline constexpr std::string_view Debug = "debug"; +}; + +//////////////////////////////////////////////////////////////////////////////// + extern const TString DefaultHosts; extern const TString DefaultRemoteTempTablesDirectory; extern const TString DefaultRemoteTempFilesDirectory; |