aaix / laravel-error-audit
AI-assisted daily audit of Laravel log errors and warnings, delivered by email.
Requires
- php: ^8.3
- aaix/laravel-ai-costs: ^1.1
- illuminate/bus: ^12.0|^13.0
- illuminate/console: ^12.0|^13.0
- illuminate/database: ^12.0|^13.0
- illuminate/mail: ^12.0|^13.0
- illuminate/support: ^12.0|^13.0
- laravel/ai: ^0
Requires (Dev)
- orchestra/testbench: ^11.0
- pestphp/pest: ^3.0|^4.0
README
Laravel Error Audit
AI-assisted daily audit of your Laravel log files, delivered by email.
Sentry, Kibana and their peers are built for live monitoring at scale. Most applications do not need that. They need a short, honest answer to one question every morning: what broke yesterday, and does any of it belong in today's plan?
This package answers it. It reads every file based log channel your application defines, groups errors and warnings by cause, has an AI model assess each distinct issue once, and mails you the result.
Installation
Install the package via Composer:
composer require aaix/laravel-error-audit
Next, publish the configuration file. This is optional but recommended.
php artisan vendor:publish --provider="Aaix\LaravelErrorAudit\ErrorAuditServiceProvider" --tag="error-audit-config"
A Quick Look
Schedule the daily report
Report generation is on demand — you own the schedule. The command dispatches a queued job by default, so a long run never blocks the scheduler:
Schedule::command('error-audit:send')->dailyAt('07:00');
Preview before anything leaves your application
Log content is sent to a third party AI provider. Inspect exactly what would be sent first — this makes no API call:
php artisan error-audit:preview
Run it manually
php artisan error-audit:send --since="48 hours" --dry-run
How it works
- Discover — every
single,dailyandstackchannel in your logging configuration is resolved to the files it actually writes to. Slack, syslog and other non file drivers are skipped. Failed queue jobs — whose exceptions never reach a log file — are read from the failed-job table and included as issues too. - Group — entries are fingerprinted so the same failure lands in one group regardless of the ids, paths, timestamps or addresses it carries.
- Redact — credentials, tokens, personal data and generated-looking strings are masked before anything leaves the application. A sample that ends up mostly masked is discarded rather than sent half redacted.
- Assess — each distinct issue is analysed once and cached by fingerprint. Ten thousand occurrences of the same exception cost one request; an issue already assessed yesterday costs nothing at all.
- Deliver — a responsive email built from Laravel's own mail components, with counters, a timeline chart and one card per issue sorted by urgency.
Documentation
For the full documentation, including every configuration key and the complete redaction pattern list, please visit our full documentation website.