PHPackages                             imtigger/laravel-custom-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. imtigger/laravel-custom-log

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

imtigger/laravel-custom-log
===========================

Laravel Custom Log

1.1.0(5y ago)1223.7k3[1 issues](https://github.com/imTigger/laravel-custom-log/issues)mitPHPPHP &gt;=7.0.0

Since Jul 6Pushed 5y ago1 watchersCompare

[ Source](https://github.com/imTigger/laravel-custom-log)[ Packagist](https://packagist.org/packages/imtigger/laravel-custom-log)[ RSS](/packages/imtigger-laravel-custom-log/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)DependenciesVersions (14)Used By (0)

Laravel CustomLog
=================

[](#laravel-customlog)

Laravel failsafe custom logging library

- Log to multiple destinations
- Log to Console (STDOUT)
- Log to File
- Log to MySQL
- Log to Redis
- Log to syslog (Local/Remote)
- Log to Graylog (TCP/UDP)
- (Optional) Failsafe (Don't throw any exceptions in case logger fails)
- (Optional) Replace Laravel log (Laravel &lt;= 5.5)
- (Optional) Register as Laravel logger channel (Laravel &gt;= 5.6)

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

[](#installation)

`composer require imtigger/laravel-custom-log`

On Laravel 5.4 and below, add the ServiceProvider to your `config/app.php`

`Imtigger\LaravelCustomLog\LaravelCustomLogServiceProvider::class`

Publish Config

`php artisan vendor:publish --provider="Imtigger\\LaravelCustomLog\\LaravelCustomLogServiceProvider" --tag=config`

Publish MySQL Migration (Optional, for Log to MySQL)

`php artisan vendor:publish --provider="Imtigger\\LaravelCustomLog\\LaravelCustomLogServiceProvider" --tag=migration`

Choose Log Destinations
-----------------------

[](#choose-log-destinations)

Add config into `.env`, you may enable multiple destinations

### Console (STDOUT)

[](#console-stdout)

- CUSTOM\_LOG\_CONSOLE\_ENABLE (true|false, default=false)

### File

[](#file)

- CUSTOM\_LOG\_FILE\_ENABLE (true|false, default=true)

### MySQL

[](#mysql)

- CUSTOM\_LOG\_MYSQL\_ENABLE (true|false, default=false)
- DB\_LOG\_CONNECTION (connection defined in database.php, default=mysql)
- DB\_LOG\_TABLE (default=logs)

### Redis

[](#redis)

- CUSTOM\_LOG\_REDIS\_ENABLE (true|false, default=false)
- REDIS\_LOG\_CONNECTION (connection defined in cache.php, default=default)
- REDIS\_LOG\_KEY

### Syslog

[](#syslog)

- CUSTOM\_LOG\_SYSLOG\_ENABLE (true|false, default=false)
- CUSTOM\_LOG\_SYSLOG\_HOST
- CUSTOM\_LOG\_SYSLOG\_PORT (default=514)

### Gelf (Graylog)

[](#gelf-graylog)

- CUSTOM\_LOG\_GELF\_ENABLE (true|false, default=false)
- CUSTOM\_LOG\_GELF\_PROTOCOL (TCP|UDP, default=UDP)
- CUSTOM\_LOG\_GELF\_HOST
- CUSTOM\_LOG\_GELF\_PORT (default=12201)

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

[](#basic-usage)

`CustomLog::emergency($channel, $message, $context)`

`CustomLog::alert($channel, $message, $context)`

`CustomLog::critical($channel, $message, $context)`

`CustomLog::error($channel, $message, $context)`

`CustomLog::warning($channel, $message, $context)`

`CustomLog::notice($channel, $message, $context)`

`CustomLog::info($channel, $message, $context)`

`CustomLog::debug($channel, $message, $context)`

`CustomLog::log($level, $channel, $message, $context)`

Replace Laravel log (Laravel &lt;= 5.5)
---------------------------------------

[](#replace-laravel-log-laravel--55)

Edit your `bootstrap/app.php`, add this before returning the application

```
$app->configureMonologUsing(function ($monolog) {
    $monolog->pushHandler(Imtigger\LaravelCustomLog\CustomLog::getSystemHandler());
});

```

Register as Laravel logger channel (Laravel &gt;= 5.6)
------------------------------------------------------

[](#register-as-laravel-logger-channel-laravel--56)

Edit your `config/logging.php`, add this to the `channels` array

```
'customlog' => [
    'driver' => 'custom',
    'via' => Imtigger\LaravelCustomLog\CustomLog::class,
]

```

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 95.8% 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 ~62 days

Recently: every ~1 days

Total

13

Last Release

2162d ago

Major Versions

0.1.8 → 1.0.12020-07-20

0.1.9 → 1.0.22020-07-20

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4729517?v=4)[Tiger Fok](/maintainers/imtigger)[@imTigger](https://github.com/imTigger)

---

Top Contributors

[![imTigger](https://avatars.githubusercontent.com/u/4729517?v=4)](https://github.com/imTigger "imTigger (23 commits)")[![timeslogistics](https://avatars.githubusercontent.com/u/29119646?v=4)](https://github.com/timeslogistics "timeslogistics (1 commits)")

### Embed Badge

![Health badge](/badges/imtigger-laravel-custom-log/health.svg)

```
[![Health](https://phpackages.com/badges/imtigger-laravel-custom-log/health.svg)](https://phpackages.com/packages/imtigger-laravel-custom-log)
```

###  Alternatives

[psr/log

Common interface for logging libraries

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

API for OpenTelemetry PHP.

1938.5M261](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2326.5M315](/packages/open-telemetry-sdk)[illuminated/console-logger

Logging and Notifications for Laravel Console Commands.

8676.7k](/packages/illuminated-console-logger)

PHPackages © 2026

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