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

ActiveLibrary

cplugins/log
============

cplugins

v1.0.5(5y ago)028MITPHPPHP &gt;=5.4.0

Since Jan 22Pushed 5y ago1 watchersCompare

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

READMEChangelog (5)DependenciesVersions (7)Used By (0)

cplugins/log
============

[](#cpluginslog)

日志组件

安装
--

[](#安装)

项目根目录执行:

```
composer require cplugins/log

```

配置
--

[](#配置)

config/app.php 目录下

注释以下配置

```
'log' => env('APP_LOG', 'single'),

```

增加以下配置

```
// 按天拆分日志
'log' => env('APP_LOG', 'daily'),
// 保留30天的日志, 根据需求进行配置
'log_max_files' => 30,

```

使用
--

[](#使用)

```
$log = new LogHelper();

$log->info("提示信息");

$log->debug("调试信息");

$log->error("错误信息");

$log->warn("警告信息");

```

输出
--

[](#输出)

```
格式： 时间 info 模块 类名 方法名 描述 code message trace
内容： [2021-01-23 11:49:07] production.INFO: /workspace/php-project/i-admin-manage-pc-interface App\Http\Controllers\Product\TemplateController testLog this is test

```

优化
--

[](#优化)

vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php文件 report方法修改如下

```
注释掉以下代码
// try {
//     $logger = $this->container->make(LoggerInterface::class);
// } catch (Exception $ex) {
//     throw $e; // throw the original exception
// }

// $logger->error(
//     $e->getMessage(),
//     array_merge($this->context(), ['exception' => $e]
// ));

追加以下代码
$log = new LogHelper();
$log->error("异常捕获", $e);

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Total

6

Last Release

1927d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a0999a4fefafb1593c031f852984bb5e5b561d613f78203b8d090c80e6bb093?d=identicon)[jpvkthhcep](/maintainers/jpvkthhcep)

---

Top Contributors

[![jpvkthhcep](https://avatars.githubusercontent.com/u/56709788?v=4)](https://github.com/jpvkthhcep "jpvkthhcep (12 commits)")

### Embed Badge

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

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

PHPackages © 2026

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