bebeboutik-api/app/Classes/ErrorLogHandler.php
Christophe LATOUR c88ea57ba5 Initial commit
2017-07-21 16:40:11 +02:00

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);
}
}
}