mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 09:06:10 +02:00
Changed the FormatterInterface to return only the formatted message and added a batch formatting method
This commit is contained in:
@@ -62,8 +62,17 @@ class LineFormatter implements FormatterInterface
|
||||
foreach ($vars['extra'] as $var => $val) {
|
||||
$output = str_replace('%extra.'.$var.'%', $val, $output);
|
||||
}
|
||||
$record['message'] = $output;
|
||||
|
||||
return $record;
|
||||
return $output;
|
||||
}
|
||||
|
||||
public function formatBatch(array $records)
|
||||
{
|
||||
$message = '';
|
||||
foreach ($records as $record) {
|
||||
$message .= $this->format($record);
|
||||
}
|
||||
|
||||
return $message;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user