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

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

xyzphp/log
==========

log support in laravel

1.0.3(9y ago)02.6kMITPHPPHP &gt;=5.5.9

Since Jun 2Pushed 9y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (4)Used By (0)

### xyzphp/log

[](#xyzphplog)

log support in laravel

### 安装/配置

[](#安装配置)

```
composer require xyzphp/log

```

或者在你的 `composer.json` 的 require 部分中添加:

```
"xyzphp/log": "1.0.*"

```

下载完毕之后,直接配置 `app/config.php` 的 `providers`:

```
        Xyzphp\Log\LogServiceProvider::class,
```

配置日志文件路径 `app/config.php`

```

        'log_path' => env('APP_LOG_PATH', storage_path('logs/laravel.log')),
```

编辑 `.env` 文件

```
        APP_LOG_PATH=/tmp/xyzphp.log

```

### 使用

[](#使用)

```
    $data = ['name'=>'xyz','sex'=>'男'];

    info("info_message",$data);              //记录info 级别的日志
    notice("notice_message",$data);          //记录notice 级别的日志
    debug("debug_message",$data);            //记录debug 级别的日志
    warning("warning_message",$data);        //记录warning 级别的日志
    critical("critical_message",$data);      //记录critical 级别的日志
    alert("alert_message",$data);            //记录alert 级别的日志
    emergency("emergency_message",$data);    //记录emergency 级别的日志
```

### 记录格式

[](#记录格式)

```
    {date} {time} {project_name} {level} {method} {request_url} {cli_ip} {server_ip} {message} {data}
    2017-06-12 15:21:01 ucenter INFO GET http://localhost 127.0.0.1 10.118.1.173 info_message {"name":"xyz","sex":"男"}

```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

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

Total

3

Last Release

3309d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9502199?v=4)[xyzphp](/maintainers/xyzphp)[@xyzphp](https://github.com/xyzphp)

---

Top Contributors

[![xyzphp](https://avatars.githubusercontent.com/u/9502199?v=4)](https://github.com/xyzphp "xyzphp (9 commits)")

### Embed Badge

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

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

###  Alternatives

[psr/log

Common interface for logging libraries

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

API for OpenTelemetry PHP.

1941.5M265](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2328.5M323](/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)
