Skip to content

vperyod/vperyod.errorlog-handler

Repository files navigation

vperyod.errorlog-handler

Log exceptions to Psr\Log

Latest version Build Status Coverage Status Quality Score

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);

About

PSR7 middleware to log exceptions to a PSR3 logger

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages