blob: c7da1d607cb48ae53f05eb1093c797cb98f9efce (
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;
}
  |