vperyod/errorlog-handler

PSR7/PSR3 Exception logging middleware

Maintainers

Package info

github.com/vperyod/vperyod.errorlog-handler

pkg:composer/vperyod/errorlog-handler

Statistics

Installs: 49

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

0.1.0 2016-06-20 16:43 UTC

This package is auto-updated.

Last update: 2026-03-01 00:22:01 UTC


README

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