MCPcopy Create free account
hub / github.com/catboost/catboost / InitCustom

Method InitCustom

library/cpp/logger/uninitialized_creator.cpp:12–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10}
11
12void TLogBackendCreatorUninitialized::InitCustom(const TString& type, ELogPriority priority, bool threaded) {
13 if (!type) {
14 Slave = MakeHolder<TNullLogBackendCreator>();
15 } else if (TFactory::Has(type)) {
16 Slave = TFactory::MakeHolder(type);
17 } else {
18 Slave = MakeHolder<TFileLogBackendCreator>(type);
19 }
20
21 if (threaded) {
22 Slave = MakeHolder<TOwningThreadedLogBackendCreator>(std::move(Slave));
23 }
24
25 if (priority != LOG_MAX_PRIORITY) {
26 Slave = MakeHolder<TFilteredBackendCreator>(std::move(Slave), priority);
27 }
28}
29
30bool TLogBackendCreatorUninitialized::Init(const IInitContext& ctx) {
31 auto type = ctx.GetOrElse("LoggerType", TString());

Callers 1

CreateLogBackendFunction · 0.80

Calls 3

HasFunction · 0.85
MakeHolderFunction · 0.85
moveFunction · 0.50

Tested by

no test coverage detected