PHPackages                             csun-metalab/laravel-multiple-logs - 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. csun-metalab/laravel-multiple-logs

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

csun-metalab/laravel-multiple-logs
==================================

Composer package for Laravel 5 that adds a few additional log files as well as facades to write to them.

1.0.1(8y ago)02.4kMITPHPPHP &gt;=5.5.9

Since Jun 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/PioneeringTechLab/laravel-multiple-logs)[ Packagist](https://packagist.org/packages/csun-metalab/laravel-multiple-logs)[ RSS](/packages/csun-metalab-laravel-multiple-logs/feed)WikiDiscussions dev Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Laravel Multiple Logs
=====================

[](#laravel-multiple-logs)

Composer package for Laravel 5 that adds a few additional log files as well as facades to write to them.

Writing to `laravel.log` is fairly easy but sometimes it is a bit cumbersome to write to additional logs.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Facades](#facades)
- [Usage Examples](#usage-examples)
- [Creating Custom File Loggers](#creating-custom-file-loggers)

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

[](#installation)

To install from Composer, use the following command:

```
composer require csun-metalab/laravel-multiple-logs

```

Now, add the following optional line(s) to your `.env` file:

```
# Number of days for which the "daily" logs should be kept; default is 7
LOG_MAX_DAYS=7

```

Next, add the service provider to your `providers` array in Laravel as follows:

```
'providers' => [
   //...

   CSUNMetaLab\MultipleLogs\Providers\LoggingServiceProvider::class,

   // You can also use the following depending on Laravel convention:
   // 'CSUNMetaLab\MultipleLogs\Providers\LoggingServiceProvider',

   //...
],

```

Add the two facades for the new loggers to your `aliases` array in Laravel as follows:

```
'aliases' => [
    //...

    'AuditLog' => CSUNMetaLab\MultipleLogs\Facades\AuditLog::class,
    'AuthLog' => CSUNMetaLab\MultipleLogs\Facades\AuthLog::class,

    // You can also use the following depending on Laravel convention:
    //'AuditLog' => 'CSUNMetaLab\MultipleLogs\Facades\AuditLog',
    //'AuthLog' => 'CSUNMetaLab\MultipleLogs\Facades\AuthLog',

    //...
],

```

Finally, run the following Artisan command to publish the configuration:

```
php artisan vendor:publish

```

Facades
-------

[](#facades)

The two facades you added to your `config/app.php` file are the following:

### AuditLog

[](#auditlog)

This writes to a file called `audit.log` in your `storage/logs` directory.

This supports all of the same methods the native `Log` facade does.

The matching `auditLogger()` helper method also supports them as instance methods.

### AuthLog

[](#authlog)

This writes to a file called `auth.log` in your `storage/logs` directory.

This supports all of the same methods the native `Log` facade does.

The matching `authLogger()` helper method also supports them as instance methods.

Usage Examples
--------------

[](#usage-examples)

### Writing INFO Data

[](#writing-info-data)

```
AuditLog::info("User performed some action");
AuthLog::info("User authenticated successfully");

auditLogger()->info("User performed some action");
authLogger()->info("User authenticated successfully");

```

### Writing ERROR Data

[](#writing-error-data)

```
AuditLog::error("User tried to perform an action unsuccessfully");
AuthLog::error("User could not authenticate");

auditLogger()->error("User tried to perform an action unsuccessfully");
authLogger()->error("User could not authenticate");

```

Creating Custom File Loggers
----------------------------

[](#creating-custom-file-loggers)

You can create your own custom file loggers by extending the `Logger` class:

```

```

Now, you can just construct it and immediately use the methods, for example:

```

```

It is now significantly easier to add multiple log files and additional logging capabilities in Laravel.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

3263d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ef2f088dbe515e7505204053ba4b89fab631db23d7638297853dc697adf7ddc4?d=identicon)[matthewfritz](/maintainers/matthewfritz)

![](https://www.gravatar.com/avatar/5c86fd91fdf698dd5c9ceffd3dce175a6ae3000d00f4c00bf65b2e97f19072a1?d=identicon)[csun-metalab](/maintainers/csun-metalab)

![](https://www.gravatar.com/avatar/eb2e4b7e97c47122102e9eca3a2707f31d812f27d774197f62f27f130d128e49?d=identicon)[luisjg](/maintainers/luisjg)

---

Top Contributors

[![matthewfritz](https://avatars.githubusercontent.com/u/1715181?v=4)](https://github.com/matthewfritz "matthewfritz (5 commits)")

### Embed Badge

![Health badge](/badges/csun-metalab-laravel-multiple-logs/health.svg)

```
[![Health](https://phpackages.com/badges/csun-metalab-laravel-multiple-logs/health.svg)](https://phpackages.com/packages/csun-metalab-laravel-multiple-logs)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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