| Conditions | 3 |
| Paths | 4 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function format(array $record) |
||
| 25 | { |
||
| 26 | $newRecord = [ |
||
| 27 | 'time' => $record['datetime']->format('Y-m-d H:i:s'), |
||
| 28 | 'level' => $record['level_name'], |
||
| 29 | 'channel' => $record['channel'], |
||
| 30 | 'message' => $record['message'], |
||
| 31 | ]; |
||
| 32 | |||
| 33 | if (! empty($record['context'])) { |
||
| 34 | $newRecord = array_merge($newRecord, $record['context']); |
||
| 35 | } |
||
| 36 | |||
| 37 | return $this->toJson($this->normalize($newRecord), true).($this->appendNewline ? "\n" : ''); |
||
| 38 | } |
||
| 39 | } |
||
| 40 |