| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function write(string $logfile, string $message, string $level) |
||
| 21 | { |
||
| 22 | $columns = [ |
||
| 23 | (new \DateTime())->format('d.m.Y H:i:s'), |
||
| 24 | strtoupper($level), |
||
| 25 | $message |
||
| 26 | ]; |
||
| 27 | |||
| 28 | $messageString = implode(' | ', $columns) . "\r\n"; |
||
| 29 | |||
| 30 | return file_put_contents($logfile, $messageString, FILE_APPEND); |
||
| 31 | } |
||
| 32 | |||
| 33 | } |