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