19 lines
443 B
PHP
19 lines
443 B
PHP
<?php
|
|
|
|
namespace App\Classes;
|
|
|
|
use Monolog\Handler\ErrorLogHandler as BaseErrorLogHandler;
|
|
|
|
class ErrorLogHandler extends BaseErrorLogHandler {
|
|
protected function write(array $record) {
|
|
if($this->expandNewlines) {
|
|
$lines = preg_split('{[\r\n]+}', (string) $record['message']);
|
|
foreach($lines as $line) {
|
|
error_log($line, $this->messageType);
|
|
}
|
|
} else {
|
|
error_log((string) $record['message'], $this->messageType);
|
|
}
|
|
}
|
|
}
|