PHPackages                             minvws/laravel-logging - 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. minvws/laravel-logging

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

minvws/laravel-logging
======================

Laravel provider for logging functionality

v4.0.0(2mo ago)14.6k↓50.6%1[2 PRs](https://github.com/minvws/nl-rdo-laravel-logging/pulls)EUPL-1.2PHPPHP ^8.2CI passing

Since Jun 8Pushed 1w ago12 watchersCompare

[ Source](https://github.com/minvws/nl-rdo-laravel-logging)[ Packagist](https://packagist.org/packages/minvws/laravel-logging)[ RSS](/packages/minvws-laravel-logging/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (22)Versions (35)Used By (0)

nl-rdo-laravel-logging
======================

[](#nl-rdo-laravel-logging)

This package extends the [minvws/audit-logger](https://github.com/minvws/nl-rdo-php-audit-logger) package and provides a generic logging service for Laravel applications for the RDO platform. It allows to easily log events to the database, syslog or other destinations.

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

[](#installation)

### Composer

[](#composer)

You can install the package via the composer package manager:

```
composer require minvws/laravel-logging
```

### Configuration

[](#configuration)

The package can be configured in the `logging.php` file. The following options are available:

OptionDescriptiondblog\_enabledEnable logging to the databaserabbitmq\_enabledEnable logging to RabbitMQauditlog\_modelThe model to use for logging to the databaselog\_full\_requestLog the full HTTP requestsyslog\_enabledEnable logging to syslogsyslog\_base64\_encode\_enabledEnable base64 encoding for syslog, cannot be disabled when syslog encrypt is enabled, default is `true`syslog\_encryptEncrypt the data before sending to syslogsyslog\_pubkeyThe public key to use for encryptionsyslog\_secretThe private key to use for encryptionrabbitmq\_additional\_allowed\_eventsAdditional events that can be logged to RabbitMQrabbitmq\_log\_piiLog PII data to RabbitMQThere are currently three logging destinations available: the database, syslog and rabbitmq.

#### Database logging

[](#database-logging)

The basic `AuditLog` model is available and by default configured. If a different model is preferred to use, the `auditlog_model` option can be set to the actual class to use.

The default model can be created in pgsql with the following statement:

```
CREATE TABLE public.audit_logs
(
    email              character varying(320),
    request            json,
    pii_request        text,
    created_at         timestamp(0) without time zone,
    event_code         character varying(255),
    action_code        character varying(255),
    source             character varying(255),
    allowed_admin_view boolean,
    failed             boolean,
    failed_reason      text
);
```

When logging to the database To log to the database, there needs to be a (eloquent) model like the `AuditLog` model. Note that this model is just an example, you can use your own model that might encrypt the actual data for instance.

To "connect" your model to the logging service, you need to set the `auditlog_model` option to the actual class to use.

See [minvws/audit-logger](https://github.com/minvws/nl-rdo-php-audit-logger) for more information.

### Usage:

[](#usage)

To use the logger, inject or resolve the `LogService` class. This class has a single method:

```
  use MinVWS\Logging\Laravel\LogService;

  $logger = app(LogService::class);
  $logger->log((new UserLoginLogEvent())
      ->asExecute()
      ->withActor($user)
      ->withData(['foo' => 'bar'])
      ->withPiiData(['bar' => 'baz'])
      ->withFailed(true, 'invalid login')
  );
```

Creating custom events
----------------------

[](#creating-custom-events)

Creating a custom event is easy. You can create a new class that extends the `MinVWS\AuditLogger\Events\Logging\GeneralLogEvent` class.

```
  use MinVWS\AuditLogger\Events\Logging\GeneralLogEvent;

  class MyCustomEvent extends GeneralLogEvent
  {
      public const EVENT_CODE = '991414';
      public const EVENT_KEY = 'my_custom_event';
  }
```

Contributing
------------

[](#contributing)

If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the GitHub repository of this package.

License
-------

[](#license)

This package is open-source and released under the European Union Public License version 1.2. You are free to use, modify, and distribute the package in accordance with the terms of the license.

Part of iCore
-------------

[](#part-of-icore)

This package is part of the iCore project.

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance91

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

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 ~50 days

Recently: every ~159 days

Total

29

Last Release

86d ago

Major Versions

v0.4.1 → v1.0.02022-08-19

v1.2.3 → v2.0.02023-03-16

v2.2.0 → v3.0.02024-06-20

v3.4.0 → v4.0.02026-04-10

PHP version history (3 changes)v0.1.1PHP ^8.0

v3.0.0PHP ^8.1

v4.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/35585f12d5551026d3cf7e8e25170cd718a16a5017096b3201ed196311ac51d9?d=identicon)[annejan](/maintainers/annejan)

![](https://avatars.githubusercontent.com/u/1367665?v=4)[Rick Lambrechts](/maintainers/ricklambrechts)[@ricklambrechts](https://github.com/ricklambrechts)

![](https://www.gravatar.com/avatar/44e7cc7a950c1f964d8c8a5e3421d5fa61d6592add09ee3936ed267d75b2be33?d=identicon)[rdobeheer](/maintainers/rdobeheer)

---

Top Contributors

[![jaytaph](https://avatars.githubusercontent.com/u/241458?v=4)](https://github.com/jaytaph "jaytaph (56 commits)")[![gerbrand-bosch](https://avatars.githubusercontent.com/u/12494166?v=4)](https://github.com/gerbrand-bosch "gerbrand-bosch (21 commits)")[![ricklambrechts](https://avatars.githubusercontent.com/u/1367665?v=4)](https://github.com/ricklambrechts "ricklambrechts (20 commits)")[![annejan](https://avatars.githubusercontent.com/u/294470?v=4)](https://github.com/annejan "annejan (15 commits)")[![lkeijmel](https://avatars.githubusercontent.com/u/532438?v=4)](https://github.com/lkeijmel "lkeijmel (14 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![mjgmaas](https://avatars.githubusercontent.com/u/311526?v=4)](https://github.com/mjgmaas "mjgmaas (9 commits)")[![randh1r](https://avatars.githubusercontent.com/u/17409257?v=4)](https://github.com/randh1r "randh1r (5 commits)")[![sigio](https://avatars.githubusercontent.com/u/781641?v=4)](https://github.com/sigio "sigio (4 commits)")[![parijke](https://avatars.githubusercontent.com/u/7671998?v=4)](https://github.com/parijke "parijke (3 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (3 commits)")[![MelchiorKokernoot](https://avatars.githubusercontent.com/u/23347384?v=4)](https://github.com/MelchiorKokernoot "MelchiorKokernoot (2 commits)")[![pk27734](https://avatars.githubusercontent.com/u/70482?v=4)](https://github.com/pk27734 "pk27734 (1 commits)")[![ppvg](https://avatars.githubusercontent.com/u/67802?v=4)](https://github.com/ppvg "ppvg (1 commits)")[![helmo](https://avatars.githubusercontent.com/u/104120?v=4)](https://github.com/helmo "helmo (1 commits)")

---

Tags

icorelaravellogging

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/minvws-laravel-logging/health.svg)

```
[![Health](https://phpackages.com/badges/minvws-laravel-logging/health.svg)](https://phpackages.com/packages/minvws-laravel-logging)
```

###  Alternatives

[laravel/octane

Supercharge your Laravel application's performance.

4.0k26.6M223](/packages/laravel-octane)[statamic/cms

The Statamic CMS Core Package

4.8k3.6M993](/packages/statamic-cms)[bagisto/bagisto

Bagisto Laravel E-Commerce

27.6k172.1k9](/packages/bagisto-bagisto)[laravel/nightwatch

The official Laravel Nightwatch package.

36210.1M36](/packages/laravel-nightwatch)[nightowl/agent

NightOwl monitoring agent — collects telemetry from laravel/nightwatch and writes to PostgreSQL

771.7k](/packages/nightowl-agent)

PHPackages © 2026

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