PHPackages                             wcg-package/eloquent-event-logger - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. wcg-package/eloquent-event-logger

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

wcg-package/eloquent-event-logger
=================================

Eloquent Event Logger is a logging tool for Laravel's Eloquent ORM. It's designed to automatically record and log events for Laravel Eloquent model's operations such as creation, updates and deletions. Detailed event logs help facilitate debugging and keep track of changes made to models over time. It's a tool for monitoring your application's data layer, ensuring data integrity, and aiding in development.

112PHP

Since Dec 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/aakashdhar/eloquent-logger)[ Packagist](https://packagist.org/packages/wcg-package/eloquent-event-logger)[ RSS](/packages/wcg-package-eloquent-event-logger/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Eloquent Event Logger
=====================

[](#eloquent-event-logger)

Eloquent Event Logger is a logging tool for Laravel's Eloquent ORM. It automatically records and logs events for Laravel Eloquent model operations such as creation, updates, and deletions. Detailed event logs help facilitate debugging and keep track of changes made to models over time. It's a tool for monitoring your application's data layer, ensuring data integrity, and aiding in development.

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require wcg-package/eloquent-event-logger
```

Configuration
-------------

[](#configuration)

Once the package is installed, Laravel's service provider should be automatically registered. If not, you can manually register the service provider in your `config/app.php` file:

```
'providers' => [
    // Other providers...
    WcgPackage\EloquentEventLogger\EloquentEventServiceProvider::class,
],
```

Usage
-----

[](#usage)

The package automatically logs events for Eloquent models in the "Models" directory. It logs updates, creations, and deletions, providing detailed information about the changes made to the models.

### Logging Events

[](#logging-events)

The following events are logged:

- **Model Updates:** Logs the old and new values of the updated model.
- **Model Creations:** Logs the details of the model being created.
- **Model Deletions:** Logs when a model is being deleted.

### Log File Location

[](#log-file-location)

Logs are stored in the `storage/logs` directory, organized by date and model name.

Logging Levels
--------------

[](#logging-levels)

Logs are created with different levels based on the type of event:

- **INFO:** Model updates, creations, and deletions.
- **ERROR:** Errors that occur during the logging process.

Customization
-------------

[](#customization)

You can customize the logging behavior by extending the `EloquentEventServiceProvider` class and overriding its methods.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

---

**Note:** Ensure that your application is set up to handle logging according to your needs, especially in production environments.

###  Health Score

14

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/fe1df1b41d15829735c378a8a721b7d466ef3dcfdb951348d0d50523a1fa9fd7?d=identicon)[wcg-package](/maintainers/wcg-package)

### Embed Badge

![Health badge](/badges/wcg-package-eloquent-event-logger/health.svg)

```
[![Health](https://phpackages.com/badges/wcg-package-eloquent-event-logger/health.svg)](https://phpackages.com/packages/wcg-package-eloquent-event-logger)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B11.5k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1941.5M276](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2328.5M343](/packages/open-telemetry-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
