BMDMSoundex icon indicating copy to clipboard operation
BMDMSoundex copied to clipboard

MonoLog Version 2 Issue with setFormatter() on NullHandler

Open mranner opened this issue 5 years ago • 0 comments

Version 2 NullHandler does not accept setFormatter(), $handler must be instanceof Monolog\Handler\FormattableHandlerInterface

I placed $handler->setFormatter($formatter) in this conditions:

if (Logger::API === 1) { $handler->setFormatter($formatter); } elseif (Logger::API === 2 && $handler instanceof Monolog\Handler\FormattableHandlerInterface) { $handler->setFormatter($formatter); }

mranner avatar Dec 01 '20 12:12 mranner