Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 1.52 KB

File metadata and controls

39 lines (31 loc) · 1.52 KB

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