From 21c54ac6609b764271c1b0ee2c600a3e4a021ce3 Mon Sep 17 00:00:00 2001 From: Sergey Chizhik Date: Fri, 5 Dec 2014 14:36:37 +0200 Subject: [PATCH] fix --- src/Monolog/Formatter/LineFormatter.php | 2 +- tests/Monolog/Formatter/LineFormatterTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Monolog/Formatter/LineFormatter.php b/src/Monolog/Formatter/LineFormatter.php index ecbeb2f6..f6055da5 100644 --- a/src/Monolog/Formatter/LineFormatter.php +++ b/src/Monolog/Formatter/LineFormatter.php @@ -99,7 +99,7 @@ class LineFormatter extends NormalizerFormatter } while ($previous = $previous->getPrevious()); } - return '[object] ('.get_class($e).'(code:'.$e->getCode().'): '.$e->getMessage().' at '.$e->getFile().':'.$e->getLine().$previousText.')'; + return '[object] ('.get_class($e).'(code: '.$e->getCode().'): '.$e->getMessage().' at '.$e->getFile().':'.$e->getLine().$previousText.')'; } protected function convertToString($data) diff --git a/tests/Monolog/Formatter/LineFormatterTest.php b/tests/Monolog/Formatter/LineFormatterTest.php index 796629a3..89e1ca2e 100644 --- a/tests/Monolog/Formatter/LineFormatterTest.php +++ b/tests/Monolog/Formatter/LineFormatterTest.php @@ -120,7 +120,7 @@ class LineFormatterTest extends \PHPUnit_Framework_TestCase $path = str_replace('\\/', '/', json_encode(__FILE__)); - $this->assertEquals('['.date('Y-m-d').'] core.CRITICAL: foobar {"exception":"[object] (RuntimeException(code:0): Foo at '.substr($path, 1, -1).':'.(__LINE__-8).')"} []'."\n", $message); + $this->assertEquals('['.date('Y-m-d').'] core.CRITICAL: foobar {"exception":"[object] (RuntimeException(code: 0): Foo at '.substr($path, 1, -1).':'.(__LINE__-8).')"} []'."\n", $message); } public function testDefFormatWithPreviousException() @@ -138,7 +138,7 @@ class LineFormatterTest extends \PHPUnit_Framework_TestCase $path = str_replace('\\/', '/', json_encode(__FILE__)); - $this->assertEquals('['.date('Y-m-d').'] core.CRITICAL: foobar {"exception":"[object] (RuntimeException(code:0): Foo at '.substr($path, 1, -1).':'.(__LINE__-8).', LogicException(code: 0): Wut? at '.substr($path, 1, -1).':'.(__LINE__-12).')"} []'."\n", $message); + $this->assertEquals('['.date('Y-m-d').'] core.CRITICAL: foobar {"exception":"[object] (RuntimeException(code: 0): Foo at '.substr($path, 1, -1).':'.(__LINE__-8).', LogicException(code: 0): Wut? at '.substr($path, 1, -1).':'.(__LINE__-12).')"} []'."\n", $message); } public function testBatchFormat()