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 Logger Laravel Package

fish/eloquent-logger

Eloquent Logger automatically records Eloquent model events and attribute changes, giving Laravel apps a simple audit trail of who changed what and when. Drop-in logging for creates, updates, and deletes with minimal setup.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. fish/eloquent-logger is a single-purpose Laravel package that hooks Eloquent model lifecycle events and persists change records to a dedicated logs table. Architecturally it is a thin observer-style layer: a service provider, a trait applied to audited models, a migration, and a config file. That is a good fit for a Laravel codebase that wants a lightweight, database-native audit trail without adopting a heavier activity-log framework. It is a poor fit if the product requirement is a compliance-grade audit ledger — the package provides change capture, not tamper-evidence, diff semantics guarantees, or retention governance. Treat it as a developer-convenience audit trail, not a regulated system of record.

Integration feasibility. Low effort. composer require, publish config and migration, run the migration, add the trait to target models. There are no external services, queues, or SDKs, so the integration surface is small and the blast radius of adoption is contained. The main integration question is whether the package's model-event capture covers the write paths we actually use (mass updates, query-builder writes, soft deletes, upserts) — many trail packages only catch Eloquent per-model events and silently miss bulk operations.

Technical risk. This is where the package scores poorly as a dependency. Eight stars and zero dependents means effectively no community validation: no ecosystem of projects proving it survives real Laravel upgrades, no issue history demonstrating responsiveness, and no third-party bug reports surfacing edge cases. The signals point to a single-maintainer, low-activity project. Additional risks: schema ownership (the package owns a logs table that may collide with existing logging conventions), write amplification on every model event, possible double-logging if another audit package is already present, and PII/secret leakage into a database table that is broadly readable. The 0.53 quality score is consistent with "works, but unproven."

Key questions to resolve before adoption.

  • Which Laravel and PHP versions are supported, and is the constraint range actively tested in CI?
  • Does it capture only dirty attributes on update, or full snapshots? Are before/after values both retained?
  • How does it behave for mass updates, upsert, raw query-builder writes, and soft deletes?
  • Is the log write inside the same transaction as the model write? What happens on rollback?
  • Can logging be queued or made failure-tolerant so an audit failure never breaks a business write?
  • Is there any built-in retention, pruning, or archival mechanism?
  • Can specific attributes be excluded or masked (passwords, tokens, PII)?
  • What is the test coverage, release cadence, and last-commit date?

Integration Approach

Stack fit. Standard Laravel on MySQL or PostgreSQL. The package adds one table and one trait; it does not alter request lifecycle or introduce middleware. It fits cleanly into a conventional controller/service/repository layering, though teams using repositories that bypass Eloquent events will find gaps.

Migration path. Publish and review the migration rather than running it blind — confirm column types, indexes, and whether the polymorphic model reference is a string or a constrained ID. There is no backfill capability, so plan for audit history to begin at deployment. If historical audit data is a requirement, that must be sourced separately.

Compatibility. Verify composer constraints against our Laravel version first. Check for conflicts with any existing logging or activity package; running two audit mechanisms produces duplicate rows and divergent truth. Confirm the trait does not collide with existing model traits that already register observers or override boot methods.

Sequencing.

  1. Spike: install in a branch, apply to one low-risk model, confirm captured payload shape for create/update/delete.
  2. Define the logging contract: which models, which attributes, PII exclusions, retention window.
  3. Staging rollout with write-latency measurement on the busiest audited model.
  4. Production on a single model, then expand model-by-model.
  5. Only after demonstrated stability, consider queuing or batching if write overhead proves material.

Operational Impact

Maintenance. The dominant operational cost is dependency ownership, not integration. With one maintainer and negligible adoption, we should assume we may need to fork and maintain it ourselves. Budget for that: a fork in our org, pinned version, and a named owner. Alternatively, evaluate whether an in-house 150-line observer or a more established activity-log package better fits the risk appetite.

Support. Community-only, effectively self-support. No vendor SLA, no security advisory channel we can rely on. Our team owns incident response for the table and the trait.

Scaling. Every audited model write becomes a second insert. On high-write tables this is measurable write amplification and can affect transaction duration. The logs table grows monotonically; without a retention policy it becomes the largest table in the schema within months. Plan indexes on model type + model ID and on timestamp from day one, and plan partitioning or scheduled pruning before volume arrives.

Failure modes.

  • Audit write failure breaks the business write if logging is synchronous and unguarded — the most serious risk.
  • Silent gaps when writes bypass Eloquent events (bulk operations, raw SQL).
  • Sensitive data persistence if attribute masking is not configured.
  • Unbounded growth leading to slow queries and storage pressure.
  • Abandonment: package breaks on a Laravel upgrade with no upstream fix.
  • Rollback inconsistency: log rows committed or lost relative to the model transaction depending on implementation.

Ramp-up. Low for implementation — a mid-level Laravel engineer can integrate in under a day. The real ramp-up is governance: product, security, and legal alignment on what is logged, how long it is retained, and who can read the table. That decision work, not the code, is the critical path.

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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
adachsoft/php-code-style