mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 00:56:08 +02:00
Removed Logger::toMonologLevel() code duplication and added relevant tests
This commit is contained in:
@@ -438,10 +438,8 @@ class Logger implements LoggerInterface
|
||||
*/
|
||||
public function log($level, $message, array $context = array())
|
||||
{
|
||||
if (is_string($level) && defined(__CLASS__.'::'.strtoupper($level))) {
|
||||
$level = constant(__CLASS__.'::'.strtoupper($level));
|
||||
}
|
||||
|
||||
$level = static::toMonologLevel($level);
|
||||
|
||||
return $this->addRecord($level, $message, $context);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user