| 28 | } |
| 29 | |
| 30 | bool Processor::Start() |
| 31 | { |
| 32 | // Start logging layout |
| 33 | if (_layout && !_layout->IsStarted()) |
| 34 | if (!_layout->Start()) |
| 35 | return false; |
| 36 | |
| 37 | // Start logging filters |
| 38 | for (auto& filter : _filters) |
| 39 | if (filter && !filter->IsStarted()) |
| 40 | if (!filter->Start()) |
| 41 | return false; |
| 42 | |
| 43 | // Start logging appenders |
| 44 | for (auto& appender : _appenders) |
| 45 | if (appender && !appender->IsStarted()) |
| 46 | if (!appender->Start()) |
| 47 | return false; |
| 48 | |
| 49 | // Start logging processors |
| 50 | for (auto& processor : _processors) |
| 51 | if (processor) |
| 52 | if (!processor->Start()) |
| 53 | return false; |
| 54 | |
| 55 | _started = true; |
| 56 | |
| 57 | return true; |
| 58 | } |
| 59 | |
| 60 | bool Processor::Stop() |
| 61 | { |