mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-23 09:36:11 +02:00
Changed the FormatterInterface to return only the formatted message and added a batch formatting method
This commit is contained in:
@@ -27,8 +27,14 @@ class JsonFormatter implements FormatterInterface
|
||||
*/
|
||||
public function format(array $record)
|
||||
{
|
||||
$record['message'] = json_encode($record);
|
||||
return json_encode($record);
|
||||
}
|
||||
|
||||
return $record;
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function formatBatch(array $records)
|
||||
{
|
||||
return json_encode($records);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user