@@ -5,13 +5,13 @@ |
||
5 | 5 | class SwpLogger |
6 | 6 | { |
7 | 7 | |
8 | - public static function log(string $message,bool $echo = false, string $fileName = 'swp.log') |
|
8 | + public static function log(string $message, bool $echo = false, string $fileName = 'swp.log') |
|
9 | 9 | { |
10 | 10 | $trace = debug_backtrace()[1]; |
11 | - $message = '[' . date('Y-m-d H:i:s') . '][' . $trace['class'] . '::' . $trace['function'] . '] ' . $message . PHP_EOL; |
|
11 | + $message = '['.date('Y-m-d H:i:s').']['.$trace['class'].'::'.$trace['function'].'] '.$message.PHP_EOL; |
|
12 | 12 | |
13 | 13 | if (!empty($fileName)) { |
14 | - file_put_contents('/tmp/' . $fileName, $message, FILE_APPEND); |
|
14 | + file_put_contents('/tmp/'.$fileName, $message, FILE_APPEND); |
|
15 | 15 | } |
16 | 16 | if ($echo) { |
17 | 17 | echo $message; |