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 ago2 watchersCompare

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

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

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity35

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/f2dcdfadde8a116076a578a3d978df35da6ef70f234f250e4bf6dfdb8ce000eb?d=identicon)[modi](/maintainers/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.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)
