Permalink
Browse files

bug #23082 [MonologBridge] Do not silence errors in ServerLogHandler:…

…:formatRecord (lyrixx)

This PR was merged into the 3.3 branch.

Discussion
----------

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

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

f1edfa7 [MonologBridge] Do not silence errors in ServerLogHandler::formatRecord
  • Loading branch information...
fabpot committed Jun 6, 2017
2 parents 1006959 + f1edfa7 commit 99573dc45b4c338d68d61fe0fa183fc0b03de1a9
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/Symfony/Bridge/Monolog/Handler/ServerLogHandler.php
@@ -51,9 +51,15 @@ public function handle(array $record)
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);

0 comments on commit 99573dc

Please sign in to comment.