yoeriboven/laravel-log-db
Store Laravel application logs in the database instead of files. This package adds a database log channel that saves messages, levels, context and timestamps to a queryable logs table, so you can browse, filter and search your logs directly from your app or admin panel.
Architecture fit. laravel-log-db plugs into Laravel's existing Monolog channel abstraction, so it occupies the same architectural slot as the single, daily, or stack drivers — one entry in config/logging.php. That is a low-blast-radius integration point: it can be scoped to specific channels (e.g. a db channel used only for application errors, while framework noise stays on file/stderr) rather than replacing the whole logging stack. For teams running multiple app servers or ephemeral containers, consolidating logs into a shared database removes the "ssh into the box and grep" workflow and makes logs queryable alongside application data. The release itself (3.0) adds no new runtime capability — it is a compatibility alignment release adding Laravel 13 and dropping Laravel 9/10/11.
Integration feasibility. Straightforward: composer require, publish and run the migration, define a channel, point LOG_STACK/LOG_CHANNEL at it. Realistic effort is well under a day for a single environment. The main unknown is the package's write semantics (per-entry synchronous insert vs. batched) and its failure behaviour, which materially affects whether it belongs on the critical path.
Technical risk. Three concerns dominate:
Key questions. Does it batch writes or insert per record? What are its failure/fallback semantics? Does it store context, stack traces, and exception payloads losslessly, or truncate? Are retention/pruning commands included? Are the timestamp and level columns indexed for query performance? Does it support configurable connections (read/write split, separate log DB)? Is Laravel 12 still supported in the v3 constraint, or is 13-only? What PHP versions are supported?
Stack fit. Natural fit for any Laravel app on 12 or 13 that currently writes files in containers or across multiple hosts. Poor fit for high-throughput services with very chatty logging, and unnecessary for single-server apps where daily files plus a log shipper already work.
Migration path. The breaking change is a Composer constraint tightening, not an API change — but it is still a hard floor:
^3.0. Low risk; no code changes expected.^3.0 will not resolve. Pin 2.1.* to stay patched on the last supported branch, and treat the Laravel 12/13 upgrade as the gate.composer update --dry-run early to surface conflicts where a sibling package still pins an older Laravel range. This is the most likely source of friction, not the package itself.Compatibility. Verify the full matrix before committing — Laravel version, PHP version, and DB driver (MySQL/Postgres/SQLite) all matter for the migration and for JSON/context column handling. Also confirm interaction with Laravel's stack channel, since most teams will want ["db", "stderr"] rather than a wholesale swap.
Sequencing.
Maintenance. Low ongoing maintenance. The package tracks Laravel's release cadence, and the 9/10/11 drop is exactly the right hygiene — it keeps the support matrix defensible rather than accumulating untested EOL branches. Counterweight: single-maintainer project, so budget for a contingency (in-house handler) rather than treating it as a foundational dependency.
Support. Aligns with Laravel's own support policy, which simplifies the internal conversation — no need to argue about whether the package supports an EOL framework version; it doesn't, and neither should your app. Document the pinned version per application in an internal registry so teams on Laravel 11 know they are on 2.1.* and why.
Scaling. The scaling surface is the log table, not the app. Expect steady row growth proportional to configured log level; at error-only volume this is usually modest, at debug volume it can be enormous. Needs: an indexed created_at and level, a scheduled prune (or partitioning at higher volumes), and ideally a separate DB connection so log writes cannot saturate the application's primary pool. Read performance degrades gracefully with proper indexing but will eventually need archival.
Failure modes.
Ramp-up. Developer ramp-up is near zero — it's another channel in a familiar config file. The real ramp-up is procedural: the team must shift from tailing files to writing SQL, which means investing in a handful of saved queries or a lightweight viewer. Without that, adoption will be superficial and the package will be seen as "the thing that fills up the database." The 3.0 upgrade itself requires no training; it requires a version audit.
How can I help you explore Laravel packages today?