| Conditions | 4 |
| Paths | 8 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
||
| 19 | { |
||
| 20 | $config = $container->get('config'); |
||
| 21 | $losConfig = array_key_exists('loslog', $config) ? $config['loslog'] : []; |
||
| 22 | |||
| 23 | $logDir = array_key_exists('log_dir', $losConfig) ? $losConfig['log_dir'] : 'data/logs'; |
||
| 24 | $logFile = array_key_exists('http_logger_file', $losConfig) ? $losConfig['http_logger_file'] : 'http.log'; |
||
| 25 | |||
| 26 | $logger = AbstractLogger::generateFileLogger($logFile, $logDir); |
||
| 27 | |||
| 28 | return new HttpLog($logger, $losConfig); |
||
| 29 | } |
||
| 30 | } |
||
| 31 |