PHPackages                             bkstar123/log-enhancer - 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. bkstar123/log-enhancer

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

bkstar123/log-enhancer
======================

This package enhances Laravel logging feature

1.0.21(5y ago)1130MITPHPPHP ^7.1.3

Since Jun 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/bkstar123/log-enhancer)[ Packagist](https://packagist.org/packages/bkstar123/log-enhancer)[ RSS](/packages/bkstar123-log-enhancer/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (24)Used By (0)

log-enhancer
============

[](#log-enhancer)

1.Requirements
--------------

[](#1requirements)

It is recommended to install this package with PHP version 7.1.3+ and Laravel Framework version 5.6+

2.Installation
--------------

[](#2installation)

```
composer require bkstar123/log-enhancer

```

3.Usage
-------

[](#3usage)

By default, the package will use a custom channel named as `bkstar123_log_enhancer` and write log messages to a file named as `laravel-bkstar123_log_enhancer-YYYY-MM-DD.log`. The default log driver is `daily` and rotation period is 7 days.

You can customize the base name of log files and the rotation period by adding the following environment settings in .env file:

- `BKSTAR123_LOG_ENHANCER_LOG_NAME`
- `BKSTAR123_LOG_ENHANCER_DAYS_FOR_ROTATION` (in days)

It is not necessary but you can also change the custom channel name with `BKSTAR123_LOG_ENHANCER_CHANNEL` setting in .env file

You can also write custom log messages to browser Javascript console with no browser extension required. Most browsers supporting console API are supported

To do so, just add the following environment setting in .env file:
`BKSTAR123_LOG_ENHANCER_TO_BROWSER_CONSOLE=true`

To write a log message, call to log() method of DebugLog facade as follows:
`DebugLog::log($level = '', string $message = '', array $context = [])`

**Note**: **DebugLog** alias is automatically registered, so you do not need to add it in the `config/app.php`

where $level can be `debug|info|notice|warning|error|critical|emergency` (default to `debug` level)

### Example:

[](#example)

```
DebugLog::log('info', "Hello {n}", ['n' => 'Antony Hoang'])
```

### Log messages are enhanced with the following data:

[](#log-messages-are-enhanced-with-the-following-data)

**datetime** (with the system timezone): date and time of log messages
**channel**: value of APP\_ENV setting in .env file
**level\_name**: value of $level
**message**: your custom log message
**pid**: the process ID of the PHP thread serving the current request
**client\_ip**: the IP address of the client browser
**url**: request path
**http\_method**: HTTP verb of the current request e.g: GET, POST ...
**route\_hanlder**: the name of the request route handler i.e `ControllerName/ActionName`
**session**: the session data associated with the request

### Sample log message:

[](#sample-log-message)

```
[2019-06-08 11:08:43 UTC] [local.INFO]: Hello Antony Hoang
{'pid': '2873', 'client_ip': '192.168.1.35', 'url': '/', 'http_method': 'GET', 'route_handler': 'App\Http\Controllers\TestController@test',
'session': {"_token":"aSKrQ8xXETX5Mywt3EoLMqTG6SfOA6M4Vc5yGyDC","_previous":{"url":"http://kpacks.acme.com"},"_flash":{"old":[],"new":[]}}}

```

###  Health Score

28

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Recently: every ~82 days

Total

22

Last Release

2088d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/90147e91656dcac27be0a14b7600445eae40a5a8f3859f8ac9e1f9a051626095?d=identicon)[bkstar123](/maintainers/bkstar123)

---

Top Contributors

[![bkstar123](https://avatars.githubusercontent.com/u/12879662?v=4)](https://github.com/bkstar123 "bkstar123 (26 commits)")

---

Tags

custom-loggingenrich-custom-log-messagelaravel-custom-logginglog-enhancerloggingloglaravelloggingenhancerenhancinglog-enhancer

### Embed Badge

![Health badge](/badges/bkstar123-log-enhancer/health.svg)

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

###  Alternatives

[ytake/laravel-fluent-logger

fluent logger for laravel and lumen

62538.4k1](/packages/ytake-laravel-fluent-logger)[moesif/moesif-laravel

Moesif Collection/Data Ingestion Middleware for Laravel

1064.9k](/packages/moesif-moesif-laravel)[melihovv/laravel-log-viewer

A Laravel log viewer

1231.5k1](/packages/melihovv-laravel-log-viewer)[hosmelq/laravel-logsnag

Integrate the power of LogSnag's real-time event tracking into your Laravel application.

237.8k](/packages/hosmelq-laravel-logsnag)

PHPackages © 2026

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