PHPackages                             cann/yii2-redis-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. [Framework](/categories/framework)
4. /
5. cann/yii2-redis-log

ActiveYii2-extension[Framework](/categories/framework)

cann/yii2-redis-log
===================

redis log extension of yii2

v1.2.4(8y ago)21.3kMITPHP

Since Oct 17Pushed 8y ago2 watchersCompare

[ Source](https://github.com/cnny/yii2-redis-log)[ Packagist](https://packagist.org/packages/cann/yii2-redis-log)[ RSS](/packages/cann-yii2-redis-log/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

#### Redis Logger Of Yii2

[](#redis-logger-of-yii2)

##### 安装

[](#安装)

```
    composer require cann/yii2-redis-log

```

##### 配置

[](#配置)

```
    // ***
    'components' => [
        'log' => [
            'targets' => [
                'redis' => [
                    'class' => 'cann\yii\log\RedisTarget',
                    'redis' => 'redis',
                    'key' => 'default',
                    'levels' => ['trace', 'info'],
                    'categories' => ['yii\*'],
                ]
            ]
        ],
    ]

```

> `key` 用于区分不同的Redis队列

##### 将redis中的日志落地至数据库

[](#将redis中的日志落地至数据库)

如果要将 `key` 为`default`的Redis Log导入数据库：

```
    yii log-handler/export-to-db default

```

如果要将所有Redis Log导入数据库：

```
    yii log-handler/export-all-to-db

```

你可以将该命令写入crontab定期执行

> log handler会自动创建log表，表名默认为 {db prefix}\_log\_{key}

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 91.7% 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 ~28 days

Total

5

Last Release

3014d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e1a271341437b80fe150d1de74c905291ce94bd48aa97ad7a02a77d9af294d6e?d=identicon)[cann](/maintainers/cann)

---

Top Contributors

[![cnny](https://avatars.githubusercontent.com/u/17918962?v=4)](https://github.com/cnny "cnny (11 commits)")[![silverd](https://avatars.githubusercontent.com/u/1514608?v=4)](https://github.com/silverd "silverd (1 commits)")

---

Tags

frameworkyii2project templatebasic

### Embed Badge

![Health badge](/badges/cann-yii2-redis-log/health.svg)

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

###  Alternatives

[yii2mod/base

Base application template for Yii2

531.3k](/packages/yii2mod-base)

PHPackages © 2026

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