PHPackages                             alexjose/audit-log - 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. alexjose/audit-log

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

alexjose/audit-log
==================

Log audits events

v2.0.4(4y ago)02.5k↓50%1MITPHPPHP ^7.2|^8.0

Since Nov 25Pushed 2y ago1 watchersCompare

[ Source](https://github.com/alexjose/audit-log)[ Packagist](https://packagist.org/packages/alexjose/audit-log)[ RSS](/packages/alexjose-audit-log/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (2)Versions (11)Used By (0)

 [![Build Status](https://github.com/alexjose/audit-log/workflows/tests/badge.svg)](https://github.com/alexjose/audit-log/actions) [![Total Downloads](https://camo.githubusercontent.com/6eb9b80ecfb7f9d5670ec74e35e403a61a193a87fd27221a9cbc78872b2c580c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c65786a6f73652f61756469742d6c6f67)](https://packagist.org/packages/alexjose/audit-log) [![Latest Stable Version](https://camo.githubusercontent.com/c440720ef8a8e5ceee4d841375c2d199fea335fe290cd3af04b168e90566f86c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c65786a6f73652f61756469742d6c6f67)](https://packagist.org/packages/alexjose/audit-log) [![License](https://camo.githubusercontent.com/9f69ea487e64df0bff78509387f7ec4208633e9957819092690639d3d75a24b8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616c65786a6f73652f61756469742d6c6f67)](https://packagist.org/packages/alexjose/audit-log)

AuditLog - Log audit events using the Monolog
=============================================

[](#auditlog---log-audit-events-using-the-monolog)

This library aims to log the critical changes happening in the application. This tracks the changes and the source of the events.

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

[](#installation)

```
composer require alexjose/audit-log
```

Basic Usage
-----------

[](#basic-usage)

```
$auditLog = new AuditLog();
$auditLog->log([
    'New User Registerd',
    'User',
    'creation',
    1,
    'user',
    'alex@example.com',
    [
        'username' => 'john',
        'email' => 'john@example.com'
    ],
    null,
    1,
    'user',
    'alex@example.com',
]);
```

### Signature of `log()`

[](#signature-of-log)

`log()` will accept an instance of `Event` or an array with the attributes of the `Event`.

```
    /**
     * @param Event|array $event
     */
    public function log($event): void
```

Signature of `new Event()`

```
    /**
     * @param string $message The title of the log
     * @param string $event The unique name of event
     * @param string $entityId The id of the entity which got modified
     * @param string $entityType The type to entity which got modified
     * @param string $entityTitle The title of the entity which got modified
     * @param array $newValues The new values of the entity
     * @param array|null $oldValues The old values of the entity
     * @param string $userId The id of the user who made the change
     * @param string $userType The type of the user who made the change
     * @param string $username The username of the user who made the change
     */
    public function __construct(
        $message,
        $module,
        $event,
        $entityId,
        $entityType,
        $entityTitle,
        $newValues,
        $oldValues,
        $userId,
        $userType,
        $username
    ):void
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 93.3% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~21 days

Recently: every ~32 days

Total

9

Last Release

1468d ago

Major Versions

v1.1.0 → v2.0.02022-01-03

PHP version history (2 changes)v1.0.0PHP ^7.2

v1.0.1PHP ^7.2|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2fb56871a4dc0542fde8ef2f79db073aff0b8a1a1e18a748883f3a0a95e2ab56?d=identicon)[alexjose](/maintainers/alexjose)

---

Top Contributors

[![alexjose](https://avatars.githubusercontent.com/u/194099?v=4)](https://github.com/alexjose "alexjose (14 commits)")[![deepak0023](https://avatars.githubusercontent.com/u/125087588?v=4)](https://github.com/deepak0023 "deepak0023 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alexjose-audit-log/health.svg)

```
[![Health](https://phpackages.com/badges/alexjose-audit-log/health.svg)](https://phpackages.com/packages/alexjose-audit-log)
```

###  Alternatives

[symfony/monolog-bridge

Provides integration for Monolog with various Symfony components

2.6k189.7M258](/packages/symfony-monolog-bridge)[rollbar/rollbar

Monitors errors and exceptions and reports them to Rollbar

33723.7M82](/packages/rollbar-rollbar)[illuminate/log

The Illuminate Log package.

6224.3M518](/packages/illuminate-log)[honeybadger-io/honeybadger-php

Honeybadger PHP library

381.5M4](/packages/honeybadger-io-honeybadger-php)[graycore/magento2-stdlogging

A Magento 2 module that changes all logging handlers to stdout

2382.6k](/packages/graycore-magento2-stdlogging)

PHPackages © 2026

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