| 10 | } |
| 11 | |
| 12 | void 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 | |
| 30 | bool TLogBackendCreatorUninitialized::Init(const IInitContext& ctx) { |
| 31 | auto type = ctx.GetOrElse("LoggerType", TString()); |
no test coverage detected