| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function makeFileLogger(): FileLogger |
||
| 26 | { |
||
| 27 | if (empty($this->config['path_logs'])) { |
||
| 28 | throw new LoggerException('Invalid logger config. "path_logs" is missing.'); |
||
| 29 | } |
||
| 30 | $logger = new FileLogger; |
||
| 31 | $logger->setLogsDir($this->config['path_logs']); |
||
| 32 | $logger->setMinLevel($this->config['min_level'] ?? LogLevel::WARNING); |
||
| 33 | |||
| 34 | return $logger; |
||
| 35 | } |
||
| 47 |