1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-07-30 18:00:17 +02:00

Logmatic fix (#914)

* Adding the marker field to improve the Logmatic.io compatibilty
This commit is contained in:
Guillaume Polaert
2017-03-12 17:13:04 +01:00
committed by Jordi Boggiano
parent c7776bba2b
commit 908960d30b
3 changed files with 12 additions and 7 deletions

View File

@@ -37,7 +37,7 @@ class LogmaticHandlerTest extends TestCase
fseek($this->res, 0);
$content = fread($this->res, 1024);
$this->assertRegexp('/testToken {"message":"Critical write test","context":\[\],"level":500,"level_name":"CRITICAL","channel":"test","datetime":"(.*)","extra":\[\],"hostname":"testHostname","appname":"testAppname"}/', $content);
$this->assertRegexp('/testToken {"message":"Critical write test","context":\[\],"level":500,"level_name":"CRITICAL","channel":"test","datetime":"(.*)","extra":\[\],"hostname":"testHostname","appname":"testAppname","@marker":\["sourcecode","php"\]}/', $content);
}
public function testWriteBatchContent()
@@ -53,7 +53,7 @@ class LogmaticHandlerTest extends TestCase
fseek($this->res, 0);
$content = fread($this->res, 1024);
$this->assertRegexp('/testToken {"message":"test","context":\[\],"level":300,"level_name":"WARNING","channel":"test","datetime":"(.*)","extra":\[\],"hostname":"testHostname","appname":"testAppname"}/', $content);
$this->assertRegexp('/testToken {"message":"test","context":\[\],"level":300,"level_name":"WARNING","channel":"test","datetime":"(.*)","extra":\[\],"hostname":"testHostname","appname":"testAppname","@marker":\["sourcecode","php"\]}/', $content);
}
private function createHandler()