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

Add millisecond precision in the LogstashFormatter

This commit is contained in:
Albert Casademont
2013-11-11 15:50:38 +01:00
parent 43f97bb5af
commit 899f7f52e5
2 changed files with 4 additions and 4 deletions

View File

@@ -35,7 +35,7 @@ class LogstashFormatterTest extends \PHPUnit_Framework_TestCase
$message = json_decode($formatter->format($record), true);
$this->assertEquals("1970-01-01T00:00:00+00:00", $message['@timestamp']);
$this->assertEquals("1970-01-01T00:00:00.000000+00:00", $message['@timestamp']);
$this->assertEquals('log', $message['@message']);
$this->assertEquals('meh', $message['@fields']['channel']);
$this->assertContains('meh', $message['@tags']);
@@ -176,7 +176,7 @@ class LogstashFormatterTest extends \PHPUnit_Framework_TestCase
$message = json_decode($formatter->format($record), true);
$this->assertEquals("1970-01-01T00:00:00+00:00", $message['@timestamp']);
$this->assertEquals("1970-01-01T00:00:00.000000+00:00", $message['@timestamp']);
$this->assertEquals("1", $message['@version']);
$this->assertEquals('log', $message['message']);
$this->assertEquals('meh', $message['channel']);