1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-28 23:41:38 +02:00

Code cleanups

This commit is contained in:
Jordi Boggiano
2022-03-05 14:03:57 +01:00
parent b586dbe8e6
commit 5eb9b8ed93
109 changed files with 418 additions and 549 deletions

View File

@@ -43,10 +43,10 @@ class PDOHandler extends AbstractProcessingHandler
}
$this->statement->execute(array(
'channel' => $record['channel'],
'level' => $record['level'],
'message' => $record['formatted'],
'time' => $record['datetime']->format('U'),
'channel' => $record->channel,
'level' => $record->level,
'message' => $record->formatted,
'time' => $record->datetime->format('U'),
));
}
@@ -78,6 +78,6 @@ $logger->info('My logger is now ready');
The `Monolog\Handler\AbstractProcessingHandler` class provides most of the
logic needed for the handler, including the use of processors and the formatting
of the record (which is why we use ``$record['formatted']`` instead of ``$record['message']``).
of the record (which is why we use ``$record->formatted`` instead of ``$record->message``).
← [Utility classes](03-utilities.md)