[MonologBridge] Do not silence errors in ServerLogHandler::formatRecord

This commit is contained in:
Grégoire Pineau 2017-06-06 17:10:52 +02:00
parent 100695978a
commit f1edfa7ec2

View File

@ -51,9 +51,15 @@ class ServerLogHandler extends AbstractHandler
if (!$this->socket = $this->socket ?: $this->createSocket()) {
return false === $this->bubble;
}
} finally {
restore_error_handler();
}
$recordFormatted = $this->formatRecord($record);
$recordFormatted = $this->formatRecord($record);
set_error_handler(self::class.'::nullErrorHandler');
try {
if (-1 === stream_socket_sendto($this->socket, $recordFormatted)) {
stream_socket_shutdown($this->socket, STREAM_SHUT_RDWR);