aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/logger/init_context/yconf.cpp
blob: 5a7a7d25009934d968f7b6480ee0be58f4f64445 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "yconf.h" 
 
TLogBackendCreatorInitContextYConf::TLogBackendCreatorInitContextYConf(const TYandexConfig::Section& section) 
    : Section(section) 
{} 
 
bool TLogBackendCreatorInitContextYConf::GetValue(TStringBuf name, TString& var) const { 
    return Section.GetDirectives().GetValue(name, var); 
} 
 
TVector<THolder<ILogBackendCreator::IInitContext>> TLogBackendCreatorInitContextYConf::GetChildren(TStringBuf name) const { 
    TVector<THolder<IInitContext>> result; 
    auto children = Section.GetAllChildren(); 
    for (auto range = children.equal_range(TCiString(name)); range.first != range.second; ++range.first) { 
        result.emplace_back(MakeHolder<TLogBackendCreatorInitContextYConf>(*range.first->second)); 
    } 
    return result; 
}