laminas / laminas-log

Robust, composite logger with filtering, formatting, and PSR-3 support
https://docs.laminas.dev/laminas-log/
BSD 3-Clause "New" or "Revised" License
26 stars 31 forks source link

registerErrorHandler returns false #22

Closed cbichis closed 3 years ago

cbichis commented 3 years ago

Hello, I noticed on my PHP 7.4.23 (running Ubuntu 20.04.3 LTS) the errors are not logged for Laminas Log so for testing I have disabled from the logger config:

'errorhandler' => true,
'exceptionhandler' => true,
'fatal_error_shutdownfunction' => true,

And rather I have set manually in onBootstrap:

$serviceManager = $e->getApplication()->getServiceManager();
$logger        = $serviceManager->get('appLog');

$result = \Laminas\Log\Logger::registerErrorHandler($logger);
$result2 = \Laminas\Log\Logger::registerFatalErrorShutdownFunction($logger);
$result3 = \Laminas\Log\Logger::registerExceptionHandler($logger);

$result is NULL, the rest are true.

It looks like the errors are not logged.

I debugged more and the: $previous is false so hence why returning false.

laminas-bot commented 3 years ago

This package is considered feature-complete, and is now in security-only maintenance mode, following a decision by the Technical Steering Committee. If you have a security issue, please follow our security reporting guidelines. If you wish to take on the role of maintainer, please nominate yourself

If you are looking for an actively maintained package alternative, we recommend: