Plugin for collecting exception handler logs and reporting over email. A simple solution for those who can't or won't pay for corporate logging solutions like New Relic, Dynatrace, Datadog, and others.
This plugin requires:
- Craft CMS
^5.0.0 - PHP
^8.2 || ^8.3 || ^8.4 || ^8.5
- If your email setup is correct
- If Simple Logger plugin is active (
LOGGER_ON=1) - If you have exceptions in
storage/logs/simplelogger.json
composer require leowebguy/simple-logger -w && php craft plugin/install simple-loggerSet these .env parameters to configure Simple Logger:
# Simple Logger
LOGGER_ON=1
LOGGER_EMAIL=john@email.comLOGGER_EMAIL accepts multiple comma-separated emails:
LOGGER_EMAIL=john@email.com,jane@email.comIf LOGGER_EMAIL is not set, Simple Logger defaults to sending the report to all Craft CMS administrators.
The plugin listens to Craft's ErrorHandler::EVENT_BEFORE_HANDLE_EXCEPTION event to capture exceptions, logging them to storage/logs/simplelogger.json:
[
{
"time": "2026-11-01 17:37:21",
"sourcetype": "Exception 400",
"level_name": "ERROR",
"message": "Twig\\Error\\RuntimeError: Calling unknown method: craft\\web\\twig\\variables\\CraftVariable::deviceDetect1() in /var/www/html/templates/index.twig:10"
}
]Once a day, Simple Logger processes the log file and queues a background email job (EmailJob) to the configured recipient(s).
Simple Logger automatically ignores NotFoundHttpException exceptions (such as 404s for nonexistent pages or missing static assets).
# Run PHPStan Level 8 static analysis
composer phpstan
# Check PSR-12 code style
composer pint-test
# Auto-fix PSR-12 code style
composer pint
# Run Craft 5 Rector rules
composer rector