lindemannrock / craft-logging-library
Reusable logging library for Craft CMS plugins
Package info
github.com/LindemannRock/craft-logging-library
Type:craft-plugin
pkg:composer/lindemannrock/craft-logging-library
5.13.0
2026-06-24 18:25 UTC
Requires
- php: ^8.2
- craftcms/cms: ^5.10
- lindemannrock/craft-plugin-base: ^5.29
- yii2mod/yii2-array-query: ^1.4
Requires (Dev)
- craftcms/ecs: dev-main
- craftcms/phpstan: dev-main
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2026-06-24 18:26:41 UTC
README
Logging Library for Craft CMS
A reusable logging library for Craft CMS plugins that provides consistent logging, dedicated log files, and a built-in log viewer interface.
Features
- Dedicated Log Files — each plugin gets its own daily log files in
storage/logs/ - Built-in Log Viewer — web interface for viewing, filtering, searching, and downloading logs
- Standalone System Log Viewer — browse all Craft, plugin, and PHP logs from one interface
- Control Panel Section — access the standalone viewer from Logging Library → All Logs when the CP section is enabled
- Control Panel Settings — display name, menu visibility, entries-per-page, and timestamp format, all overridable from
config/logging-library.php - LoggingTrait — drop-in trait with
logInfo(),logWarning(),logError(),logDebug() - LoggingService API — direct logging, log statistics, recent entries, and cleanup
- High Performance Caching — indexed file-based cache for large log viewer pages, with ArrayQuery compatibility for API callers
- Multi-Format Parsing — automatically detects plugin, Craft CMS, and PHP error log formats
- Edge Detection — auto-disables log viewer on edge/CDN platforms like Servd
- Monolog Integration — uses Craft 5's Monolog system with proper PSR-3 standards
- Configurable — customizable log levels, retention, permissions, and sidebar menus
Requirements
- Craft CMS 5.10+
- PHP 8.2+
Installation
Composer
composer require lindemannrock/craft-logging-library && php craft plugin/install logging-library
DDEV
ddev composer require lindemannrock/craft-logging-library && ddev craft plugin/install logging-library
Documentation
Full documentation is available in the docs folder.
Support
- Issues: GitHub Issues
- Email: support@lindemannrock.com
License
This plugin is licensed under the MIT License. See LICENSE for details.
Developed by LindemannRock
