mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-04 20:27:31 +02:00
Fixed previous commit
This commit is contained in:
@@ -55,7 +55,7 @@ class WildfireFormatter extends LineFormatter implements FormatterInterface
|
|||||||
// Create JSON object describing the appearance of the message in the console
|
// Create JSON object describing the appearance of the message in the console
|
||||||
$json = json_encode(array(
|
$json = json_encode(array(
|
||||||
array(
|
array(
|
||||||
'Type' => $this->logLevels($record['level']),
|
'Type' => $this->logLevels[$record['level']],
|
||||||
'File' => '',
|
'File' => '',
|
||||||
'Line' => '',
|
'Line' => '',
|
||||||
),
|
),
|
||||||
|
@@ -22,9 +22,9 @@ class WildfireFormatterTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testDefaultFormatIsLineFormatterWithoutNewLine($record)
|
public function testDefaultFormatIsLineFormatterWithoutNewLine($record)
|
||||||
{
|
{
|
||||||
$wildfire = new WildfireFormatter();
|
$wildfire = new WildfireFormatter();
|
||||||
|
|
||||||
$record = $wildfire->format($record);
|
$record = $wildfire->format($record);
|
||||||
|
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
'70|[{"Type":"ERROR","File":"","Line":""},"meh: log extra(ip: 127.0.0.1)"]|',
|
'70|[{"Type":"ERROR","File":"","Line":""},"meh: log extra(ip: 127.0.0.1)"]|',
|
||||||
$record['message']
|
$record['message']
|
||||||
@@ -34,13 +34,14 @@ class WildfireFormatterTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function recordProvider()
|
public function recordProvider()
|
||||||
{
|
{
|
||||||
$record = array(
|
$record = array(
|
||||||
|
'level' => Logger::ERROR,
|
||||||
'level_name' => 'ERROR',
|
'level_name' => 'ERROR',
|
||||||
'channel' => 'meh',
|
'channel' => 'meh',
|
||||||
'datetime' => new \DateTime,
|
'datetime' => new \DateTime,
|
||||||
'extra' => array('ip' => '127.0.0.1'),
|
'extra' => array('ip' => '127.0.0.1'),
|
||||||
'message' => 'log',
|
'message' => 'log',
|
||||||
);
|
);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
array($record),
|
array($record),
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user