PHPackages                             yueguang/yueguang-log-drive - 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. yueguang/yueguang-log-drive

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

yueguang/yueguang-log-drive
===========================

23PHP

Since Dec 6Pushed 4y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel 日志驱动
============

[](#laravel-日志驱动)

Laravel 自带的日志驱动，只能支持按照日期才分日志。线上翻了一遍，也没发现有更加好的驱动。所以自己实现了一个

### 日志驱动效果

[](#日志驱动效果)

1. 支持按照类+日期分做日志分割
2. 日志详情增加了【file】 显示日志埋点详细位置 【pid】进程号，【traceId】 全局唯一索引，【path】 路由信息

#### 日志驱动效果 图：

[](#日志驱动效果-图)

##### 埋点：

[](#埋点)

[![image](https://user-images.githubusercontent.com/21374954/144803541-f7cb2896-b0b8-4a4d-99d6-d72f03a52c28.png)](https://user-images.githubusercontent.com/21374954/144803541-f7cb2896-b0b8-4a4d-99d6-d72f03a52c28.png)

##### 日志展示：

[](#日志展示)

[![image](https://user-images.githubusercontent.com/21374954/144803571-e34e973b-bc12-4de0-99a3-7ccfb45d9fc5.png)](https://user-images.githubusercontent.com/21374954/144803571-e34e973b-bc12-4de0-99a3-7ccfb45d9fc5.png)

##### 日志内容：

[](#日志内容)

[![image](https://user-images.githubusercontent.com/21374954/144803685-86caf272-80fb-42a8-8fd7-09512d0a1df0.png)](https://user-images.githubusercontent.com/21374954/144803685-86caf272-80fb-42a8-8fd7-09512d0a1df0.png)

### 按照教程

[](#按照教程)

1.安装这个包的时候你的 composer.json 在require可以加这样一行： "yueguang/yueguang-log-drive": "dev-main"
2.下面安装这个自定义包吧： composer update yueguang/yueguang-log-drive
3.执行 composer dump-autoload

### 使用

[](#使用)

在config\\logging.php 上新增驱动设置

'custom' =&gt; \[ 'driver' =&gt; 'custom', 'via' =&gt; MonologCustomizeFormatter::class, 'path' =&gt; storage\_path('logs/laravel.log'), 'days' =&gt; 30, \],

大功告成！

注意：目前日志驱动只支持Laravel 框架

开源不容易，各位大佬如果觉得好用，点个赞或者打赏一下，支持一下，谢谢大家

[![a0c1a444651d292cb6862c58de04bdc](https://user-images.githubusercontent.com/21374954/144804788-2b0024a3-d383-4581-af30-cf944f410274.jpg)](https://user-images.githubusercontent.com/21374954/144804788-2b0024a3-d383-4581-af30-cf944f410274.jpg)

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/33893053622deebc3f6b1f61e8c1d52405f1b453bb194e284b88e1b9ca95e241?d=identicon)[pazuyue](/maintainers/pazuyue)

---

Top Contributors

[![pazuyue](https://avatars.githubusercontent.com/u/21374954?v=4)](https://github.com/pazuyue "pazuyue (7 commits)")

### Embed Badge

![Health badge](/badges/yueguang-yueguang-log-drive/health.svg)

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

###  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)
