소스 검색

Merge branch '1.x'

Jordi Boggiano 9 년 전
부모
커밋
9cabe2961a
2개의 변경된 파일21개의 추가작업 그리고 1개의 파일을 삭제
  1. 10 0
      CHANGELOG.mdown
  2. 11 1
      src/Monolog/Handler/StreamHandler.php

+ 10 - 0
CHANGELOG.mdown

@@ -1,3 +1,13 @@
+### 1.22.0 (2016-11-XX)
+
+  * Added MercurialProcessor to add mercurial revision and branch names to log records
+  * Added support for AWS SDK v3 in DynamoDbHandler
+  * Fixed fatal errors occuring when normalizing generators that have been fully consumed
+  * Fixed RollbarHandler to include a level (rollbar level), monolog_level (original name), channel and datetime (unix)
+  * Fixed RollbarHandler not flushing records automatically, calling close() explicitly is not necessary anymore
+  * Fixed SyslogUdpHandler to avoid sending empty frames
+  * Fixed a few PHP7 compatibility issues
+
 ### 1.21.0 (2016-07-29)
 
   * Break: Reverted the addition of $context when the ErrorHandler handles regular php errors from 1.20.0 as it was causing issues

+ 11 - 1
src/Monolog/Handler/StreamHandler.php

@@ -115,13 +115,23 @@ class StreamHandler extends AbstractProcessingHandler
             flock($this->stream, LOCK_EX);
         }
 
-        fwrite($this->stream, (string) $record['formatted']);
+        $this->streamWrite($this->stream, $record);
 
         if ($this->useLocking) {
             flock($this->stream, LOCK_UN);
         }
     }
 
+    /**
+     * Write to stream
+     * @param resource $stream
+     * @param array $record
+     */
+    protected function streamWrite($stream, array $record)
+    {
+        fwrite($stream, (string) $record['formatted']);
+    }
+
     private function customErrorHandler($code, $msg)
     {
         $this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg);