25 $logger =
new Logger(
'foo');
28 $handler->setFormatter(
new LineFormatter(
'%level_name% %message%'));
30 $this->handler = $handler;
37 $convert =
function ($record) {
38 $lower =
function ($match) {
39 return strtolower($match[0]);
42 return preg_replace_callback(
'{^[A-Z]+}', $lower, $record[
'formatted']);
45 return array_map($convert, $this->handler->getRecords());
Used for testing purposes.
Processes a record's message according to PSR-3 rules.
getLogs()
This must return the log messages in order with a simple formatting: "<LOG LEVEL> <MESSAGE>".
Provides a base test class for ensuring compliance with the LoggerInterface.