Exemplo n.º 1
0
 public function testFormatWithApplicationName()
 {
     $formatter = new LogstashFormatter('app', 'test');
     $record = array('level' => Logger::ERROR, 'level_name' => 'ERROR', 'channel' => 'meh', 'context' => array('from' => 'logger'), 'datetime' => new \DateTime("@0"), 'extra' => array('key' => 'pair'), 'message' => 'log');
     $message = json_decode($formatter->format($record), true);
     $this->assertArrayHasKey('@type', $message);
     $this->assertEquals('app', $message['@type']);
 }
Exemplo n.º 2
0
 public function __construct($applicationName, $systemName = null, $extraPrefix = null, $contextPrefix = '')
 {
     parent::__construct($applicationName, $systemName = null, $extraPrefix = null, $contextPrefix = '', $version = self::V1);
 }