diff options
author | iddqd <iddqd@yandex-team.ru> | 2022-02-10 16:49:46 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:46 +0300 |
commit | ff241e1daf76d79ed38015cdb76d55eb3a33ac27 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/logger/init_context/config.cpp | |
parent | 07fce9c5f7771600d0b3d70e1f88fd8a7e164d85 (diff) | |
download | ydb-ff241e1daf76d79ed38015cdb76d55eb3a33ac27.tar.gz |
Restoring authorship annotation for <iddqd@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/logger/init_context/config.cpp')
-rw-r--r-- | library/cpp/logger/init_context/config.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/library/cpp/logger/init_context/config.cpp b/library/cpp/logger/init_context/config.cpp index 2fe503fbc8..30efa13333 100644 --- a/library/cpp/logger/init_context/config.cpp +++ b/library/cpp/logger/init_context/config.cpp @@ -1,26 +1,26 @@ -#include "config.h" - -TLogBackendCreatorInitContextConfig::TLogBackendCreatorInitContextConfig(const NConfig::TConfig& config) - : Config(config) -{} - -bool TLogBackendCreatorInitContextConfig::GetValue(TStringBuf name, TString& var) const { - if (Config.Has(name)) { - var = Config[name].Get<TString>(); - return true; - } - return false; -} - -TVector<THolder<ILogBackendCreator::IInitContext>> TLogBackendCreatorInitContextConfig::GetChildren(TStringBuf name) const { - TVector<THolder<IInitContext>> result; - const NConfig::TConfig& child = Config[name]; - if (child.IsA<NConfig::TArray>()) { - for (const auto& i: child.Get<NConfig::TArray>()) { - result.emplace_back(MakeHolder<TLogBackendCreatorInitContextConfig>(i)); - } - } else if (!child.IsNull()) { - result.emplace_back(MakeHolder<TLogBackendCreatorInitContextConfig>(child)); - } - return result; -} +#include "config.h" + +TLogBackendCreatorInitContextConfig::TLogBackendCreatorInitContextConfig(const NConfig::TConfig& config) + : Config(config) +{} + +bool TLogBackendCreatorInitContextConfig::GetValue(TStringBuf name, TString& var) const { + if (Config.Has(name)) { + var = Config[name].Get<TString>(); + return true; + } + return false; +} + +TVector<THolder<ILogBackendCreator::IInitContext>> TLogBackendCreatorInitContextConfig::GetChildren(TStringBuf name) const { + TVector<THolder<IInitContext>> result; + const NConfig::TConfig& child = Config[name]; + if (child.IsA<NConfig::TArray>()) { + for (const auto& i: child.Get<NConfig::TArray>()) { + result.emplace_back(MakeHolder<TLogBackendCreatorInitContextConfig>(i)); + } + } else if (!child.IsNull()) { + result.emplace_back(MakeHolder<TLogBackendCreatorInitContextConfig>(child)); + } + return result; +} |