Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Eloquent Log Driver Laravel Package

juststeveking/eloquent-log-driver

A Laravel logging driver that stores your application logs in the database through Eloquent, letting you query, filter, and manage log entries like any other model instead of writing them to flat files.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Observability build-vs-buy, made concrete. This package turns the abstract question "should logs live in our own database?" into something a PM can compare line-by-line against file/stdout, a log SaaS (Datadog, Papertrail, Loki), or an error tracker (Sentry). Its real value in a decision process is as a reference implementation of the database-sink option — not as a dependency.
  • Support and admin tooling roadmap. Database-backed logs make a support-facing log viewer, per-tenant debugging, or an in-app "recent activity" panel feasible without procuring an observability vendor. That is roadmap input: it tells you whether admin/back-office visibility can ship this quarter or must wait on procurement.
  • Cost and vendor consolidation. For low-volume internal apps, routing a narrow set of events to the application database can defer or eliminate a log-SaaS contract. The same outcome is achievable with a small custom Laravel log channel, so treat this as a tradeoff frame rather than a procurement shortcut.
  • A clear build-vs-adopt recommendation. With 7 stars, 0 dependents, and a last release in November 2020 (Laravel 8 era), this should be treated as a blueprint, not a strategic dependency. The decision it should drive is "internalize a ~1–2 day custom Laravel log channel," not "adopt this package."
  • Compliance and retention planning. The package forces explicit answers on retention windows, PII redaction, access control, and whether logs need append-only storage. It provides none of those out of the box — which is exactly why it surfaces requirements that would otherwise be deferred until an incident.
  • Diagnostics vs. audit trail framing. These are different products with different designs. A database sink is defensible for queryable, low-volume audit-style events; it is the wrong tool for high-volume ephemeral diagnostics. Getting that distinction on record early prevents expensive re-litigation later.

When to Consider This Package

Consider it when all of the following hold:

  • You need logs queryable via Eloquent and from inside the Laravel app — admin panel, support console, or tenant-scoped debugging.
  • Traffic and log volume are low-to-moderate; synchronous per-record inserts and unbounded table growth are acceptable, or you will add pruning.
  • You are willing to fork or vendor the code and own it from day one — treating it as a starting point rather than a maintained dependency.
  • Your Laravel/Monolog versions are validated by a short spike. The package predates Monolog 3 (used from Laravel 9+), so handler-signature compatibility is not guaranteed and is the most likely integration blocker.
  • You are comfortable with a single-maintainer, near-zero-adoption package and have a written fallback plan.

The best realistic use is a secondary, non-critical channel running alongside file/stdout logging: failed webhook deliveries, payment-provider callbacks, auth anomalies, scheduled-command outcomes — events you want to SELECT rather than grep.

Look elsewhere when:

  • You need production-grade search, alerting, or dashboards at scale — use a dedicated log aggregator or error tracker.
  • You need a first-party audit trail with actor/subject semantics — prefer a maintained activity-log package; this is a log sink, not an audit model.
  • You require a supported dependency with active maintenance, security patching, and Laravel 11/12 guarantees.
  • You run high-throughput or multi-service systems where database write amplification, connection pressure, and log-table bloat are real risks.
  • You need retention/rotation, redaction, or compliance controls out of the box.

How to Pitch It (Stakeholders)

Executives: This package demonstrates a low-cost path to making application logs visible inside our own product — useful for support tooling and admin visibility without signing a new observability contract. The catch is that it is a small, single-maintainer project last released in 2020 with essentially no downstream adoption. My recommendation is to treat it as a design reference, not a dependency, and budget roughly one to two engineering days to build an equivalent log channel in-house that we control and can maintain. That buys the product capability while avoiding the dependency risk. Ongoing ownership cost is modest — on the order of 2–4 engineer-days per year for framework compatibility — but it belongs to us either way.

Engineering: Functionally it is a thin Monolog handler that persists records through an Eloquent model and registers as a Laravel log channel via the framework's intended extension point, so blast radius is contained to whichever channels we point at it. Surface area is small — driver/handler, model, migration, and config wiring — readable end to end in under an hour. The real risks are the Monolog 2 → 3 write() signature break on modern Laravel, synchronous INSERTs on the request path, no retention or rotation, database-outage recursion masking the original incident, and no test matrix against current framework versions.

Recommended sequence: (1) run a 1–2 day spike against our exact Laravel/Monolog versions for a go/no-go verdict; (2) given the dormancy, reimplement in-house at roughly 120–200 lines with Monolog 3 signatures, PII redaction, a buffered or queued write path, and a try/catch fallback to a file channel; (3) own the migration locally so we control columns, indexes, and partitioning; (4) run it as a secondary channel in non-production for a sprint, establish retention and a dedicated database connection, then promote to production behind a stack channel so stdout remains primary. Add the channel to CI smoke tests so a framework upgrade fails the build rather than silently killing logging.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource