Skip to content

Commit

Permalink
Added newline to json stream output
Browse files Browse the repository at this point in the history
Log messages with the json stream did not contain a new line after every log message.
  • Loading branch information
Fgruntjes authored Mar 16, 2018
1 parent 46b5936 commit 09556b6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected function _write($event)
$eventData = array_filter($eventData, function ($var) { return $var !== null; });
$line = @json_encode($eventData);

if (false === @fwrite($this->_stream, $line)) {
if (false === @fwrite($this->_stream, $line . PHP_EOL)) {
//require_once 'Zend/Log/Exception.php';
throw new Zend_Log_Exception("Unable to write to stream");
}
Expand Down

0 comments on commit 09556b6

Please sign in to comment.