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

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

zii/log
=======

zii/log

4271PHP

Since Nov 27Pushed 6y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 日志扩展
=========

[](#yii2-日志扩展)

该扩展实现了以下 [Yii2 日志 targets](https://www.yiiframework.com/doc/guide/2.0/en/runtime-logging#log-targets)：

- FluentdTarget 通过网络发送日志给 Fluentd 实例

如果你要验证、开发本扩展，可使用我们提供的 [Docker Compose 开发环境](https://github.com/benbanfa/zii-log-dev)。

目录说明
----

[](#目录说明)

```
docs/                   文档
src/                    PHP 代码主目录
tests/                  PHP 测试代码目录
vendor/                 PHP Composer 依赖安装目录

```

提示：重要文件首部有注释。

在 Yii2 项目里使用该扩展
---------------

[](#在-yii2-项目里使用该扩展)

以 FluentdTarget 为例：

```
// ...
'bootstrap' => [
    'log',
],
'components' => [
    'log' => [
        'targets' => [
            [
                'class' => \zii\log\FluentdTarget::class,
                'levels' => ['error', 'warning'],
                'host' => 'fluentd-forwarder', // Fluentd 实例地址
                'port' => 24224, // Fluentd 实例端口
            ],
        ],
    ],
],
// ...

```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity36

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://avatars.githubusercontent.com/u/769492?v=4)[Mo Di](/maintainers/modi)[@modi](https://github.com/modi)

---

Top Contributors

[![modi](https://avatars.githubusercontent.com/u/769492?v=4)](https://github.com/modi "modi (10 commits)")

---

Tags

fluentdloggingyii2

### Embed Badge

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

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

###  Alternatives

[psr/log

Common interface for logging libraries

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

API for OpenTelemetry PHP.

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

SDK for OpenTelemetry PHP.

2328.5M343](/packages/open-telemetry-sdk)

PHPackages © 2026

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