1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-12 08:04:02 +02:00

Add support for objects in WildfireFormatter

This commit is contained in:
Kirill chEbba Chebunin
2011-08-02 23:47:29 +04:00
parent fe0b8b59ed
commit 4c07f2dcc5
2 changed files with 13 additions and 15 deletions

View File

@@ -25,8 +25,8 @@ class WildfireFormatterTest extends \PHPUnit_Framework_TestCase
'level' => Logger::ERROR,
'level_name' => 'ERROR',
'channel' => 'meh',
'context' => array(),
'datetime' => new \DateTime,
'context' => array('from' => 'logger'),
'datetime' => new \DateTime("@0"),
'extra' => array('ip' => '127.0.0.1'),
'message' => 'log',
);
@@ -34,7 +34,8 @@ class WildfireFormatterTest extends \PHPUnit_Framework_TestCase
$message = $wildfire->format($record);
$this->assertEquals(
'84|[{"Type":"ERROR","File":"","Line":"","Label":"meh"},"log [] {\\"ip\\":\\"127.0.0.1\\"}"]|',
'166|[{"Type":"ERROR","File":"","Line":"","Label":"meh"},'
.'{"message":"log","date":"Thu, 01 Jan 1970 00:00:00 +0000","context":{"from":"logger"},"extra":{"ip":"127.0.0.1"}}]|',
$message
);
}