mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-24 18:16:10 +02:00
Add LogRecord class, drop PHP <8.1
This commit is contained in:
@@ -14,6 +14,7 @@ namespace Monolog\Formatter;
|
||||
use Monolog\DateTimeImmutable;
|
||||
use Monolog\Utils;
|
||||
use Throwable;
|
||||
use Monolog\LogRecord;
|
||||
|
||||
/**
|
||||
* Normalizes incoming records to remove objects/resources so it's easier to dump to various targets
|
||||
@@ -50,8 +51,10 @@ class NormalizerFormatter implements FormatterInterface
|
||||
*
|
||||
* @param mixed[] $record
|
||||
*/
|
||||
public function format(array $record)
|
||||
public function format(LogRecord $record)
|
||||
{
|
||||
$record = $record->toArray();
|
||||
|
||||
return $this->normalize($record);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user