| Total Complexity | 4 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class ExceptionLogger |
||
| 14 | { |
||
| 15 | protected ConfigInterface $configInterface; |
||
| 16 | protected LoggerInterface $fileLogger; |
||
| 17 | |||
| 18 | public function __construct(ConfigInterface $configInterface) |
||
| 19 | { |
||
| 20 | $this->configInterface = $configInterface; |
||
| 21 | $this->fileLogger = new \WebServCo\Framework\Log\FileLogger( |
||
| 22 | \WebServCo\Framework\Helpers\PhpHelper::isCli() ? 'errorCLI' : 'error', |
||
| 23 | $this->configInterface->get('app/path/log'), |
||
| 24 | ); |
||
| 25 | } |
||
| 26 | |||
| 27 | public function getFormattedMessage(\Throwable $exception): string |
||
| 34 | ); |
||
| 35 | } |
||
| 36 | |||
| 37 | public function log(\Throwable $exception): void |
||
| 42 | } |
||
| 43 | } |
||
| 44 |