| Conditions | 4 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 25 | protected function write(array $record) |
||
| 26 | { |
||
| 27 | if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Throwable)) { |
||
| 28 | $this->logfile->captureException($record['context']['exception']); |
||
| 29 | } else { |
||
| 30 | $payload = new Payload($record['formatted']['message'], Payload::uuid4()); |
||
| 31 | $payload->setContext($record['formatted']['context']); |
||
| 32 | foreach ($record['formatted']['extra'] as $key => $value) { |
||
| 33 | $payload->addTag($key, $value); |
||
| 34 | } |
||
| 35 | $this->logfile->log($payload); |
||
| 36 | } |
||
| 39 |