Просмотр исходного кода

Fix a bug and a broken test.

Very embarrassing.
Oliver Byford 12 лет назад
Родитель
Сommit
c67470515d

+ 1 - 0
src/Monolog/Formatter/LogstashV1Formatter.php

@@ -71,6 +71,7 @@ class LogstashV1Formatter extends NormalizerFormatter
             'message' => $record['message'],
             'host' => $this->systemName,
             'type' => $record['channel'],
+            'channel' => $record['channel'],
             'level' => $record['level_name']
         );
 

+ 1 - 1
tests/Monolog/Formatter/LogstashV1FormatterTest.php

@@ -41,7 +41,7 @@ class LogstashV1FormatterTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals('meh', $message['channel']);
         $this->assertEquals('ERROR', $message['level']);
         $this->assertEquals('test', $message['type']);
-        $this->assertEquals('hostname', $message['source']);
+        $this->assertEquals('hostname', $message['host']);
 
         $formatter = new LogstashV1Formatter('mysystem');