webware/webware-log

Webware Logging component

Maintainers

Package info

github.com/webinertia/webware-log

Homepage

Chat

pkg:composer/webware/webware-log

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 1

1.0.0 2026-08-11 23:25 UTC

README

PHP Version Latest Stable Version License Continuous Integration codecov Mutation testing badge

This package provides logging via Monolog for Mezzio (PSR-15) applications. It provides log handlers backed by php-db/phpdb for writing logs to a database table. It also provides a PSR-14 event listener and a Laminas EventManager bridge listener for error logging.

Documentation

Quick Start

Install the package and let laminas-component-installer inject the ConfigProvider:

composer require webware/webware-log

Import the database schema and add the package's ConfigProvider to your config aggregator if not done automatically. Then pipe the middleware into your application pipeline:

// config/pipeline.php
$app->pipe(\Webware\Log\Middleware\MonologMiddleware::class);

Enable optional features via config:

// config/autoload/log.local.php
use Psr\Log\LoggerInterface;

return [
    LoggerInterface::class => [
        'log_errors'     => true,  // auto-log uncaught exceptions
        'process_uuid'   => true,  // add UUID v7 to every record
        'channel'        => 'app', // LogChannel enum value
    ],
];

See the full documentation for details on all options, handlers, processors, and event-driven logging.