1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-08 06:06:40 +02:00

Remove default handler when no handlers are set

This commit is contained in:
Jordi Boggiano
2015-10-09 20:43:55 +01:00
parent 902c0c8694
commit ad37b7b2d1

View File

@@ -274,10 +274,6 @@ class Logger implements LoggerInterface
*/
public function addRecord($level, $message, array $context = array())
{
if (!$this->handlers) {
$this->pushHandler(new StreamHandler('php://stderr', static::DEBUG));
}
$levelName = static::getLevelName($level);
// check if any handler will handle this message so we can return early and save cycles