vperyod / errorlog-handler
PSR7/PSR3 Exception logging middleware
0.1.0
2016-06-20 16:43 UTC
Requires
- psr/http-message: ^1.0
- psr/log: ^1.0
Requires (Dev)
Suggests
- monolog/monolog: For logger implementation
This package is auto-updated.
Last update: 2024-10-29 03:53:32 UTC
README
Log exceptions to Psr\Log
Installation
composer require vperyod/errorlog-handler
Usage
See Psr\Log documentation.
// Create handler with a Logger instance $handler = new Vperyod\ErrorlogHandler\ErrorlogHandler($logger); // Optionally set the level to log (default:alert) $handler->setLogLevel(LogLevel::ERROR); // Optionally disable rethrowing if there are no other handlers for errors $handler->setReThrow(false); // Add to your middleware stack, radar, relay, etc. $stack->middleware($handler);