webware / webware-log
Webware Logging component
Requires
- php: ~8.4.1 || ~8.5.0 || 8.6.0-dev
- laminas/laminas-component-installer: ^3.2
- laminas/laminas-hydrator: ^4.15.0
- monolog/monolog: ^3.4
- phly/phly-event-dispatcher: ^1.5.0
- ramsey/uuid: ^4.7
Requires (Dev)
- infection/infection: ^0.34.1
- laminas/laminas-diactoros: ^3.5
- laminas/laminas-eventmanager: ^3.14
- laminas/laminas-i18n: ^2.31.0
- laminas/laminas-servicemanager: ^3.23.0 || ^4.0.0
- mezzio/mezzio: ^3.26
- mezzio/mezzio-authentication: ^1.13
- php-db/phpdb-mysql: 0.5.x-dev
- php-standard-library/type: ^6.2
- phpbench/phpbench: ^1.7
- phpunit/phpunit: ^13.3.0
- roave/backward-compatibility-check: ^8.21.0
- roave/security-advisories: dev-master
- webware/webware-tools: ^0.1.x-dev
Suggests
- php-db/phpdb-mysql: Required when using PhpDbHandler with a MySQL/MariaDB database
This package is auto-updated.
Last update: 2026-08-12 02:15:36 UTC
README
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
- Installation
- Configuration Reference
- Middleware
- Handlers
- Processors
- Event-Driven Logging (PSR-14)
- Error Logging
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.