PHPackages                             kriss/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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. kriss/yii2-redis-log

ActiveYii2-extension[Logging &amp; Monitoring](/categories/logging)

kriss/yii2-redis-log
====================

Yii2 log redisTarget

v1.3(8y ago)035.7k↓25%1MITPHP

Since Aug 3Pushed 8y ago1 watchersCompare

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

READMEChangelog (4)Dependencies (2)Versions (6)Used By (0)

Yii2 log redisTarget
====================

[](#yii2-log-redistarget)

Yii2 log for redisTarget and dump redisLog to FileTarget.

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist kriss/yii2-redis-log -vvv

```

or add

```
"kriss/yii2-redis-log": "*"

```

to the require section of your `composer.json` file.

Simple Usage
------------

[](#simple-usage)

1. config config file

```
'log' => [
    'targets' => [
        [
            'class' => 'kriss\log\RedisTarget',
            'redis' => [
                'hostname' => 'localhost',
                'port' => 6379,
            ],
            // If you have configured the redis yii\redis\Connection as an application component,use bwlow
            //'redis' => 'redis',
            'key' => 'yii.log',
            'levels' => ['error', 'warning'],
        ],
    ]
]
```

2. use Yii common Logger component like :

```
Yii::error('this is en error');
```

3. now you see log in your redis

Dump Redis Log to File
----------------------

[](#dump-redis-log-to-file)

1. config

```
'log' => [
    'targets' => [
        [
            'class' => 'kriss\log\RedisTarget',
            'redis' => 'redis',
            'key' => 'yii.log',
            'dumpFileTarget' => [
                'logFile' => '@common/runtime/logs/error.log',
            ],
            'levels' => ['error', 'warning'],
        ],
    ]
]
```

2.1. Dump One

```
$dumper = new Dump2File([
  'redisTargetKey' => 'yii.log',
]);
$dumper->dump();
```

2.2. Dump From Yii Log Target

```
$targets = Yii::$app->log->targets;
foreach ($targets as $target) {
    if ($target instanceof RedisTarget) {
        $dumper = new Dump2File([
            'redisTarget' => $target,
            'count' => 1000
        ]);
        $dumper->dump();
    }
}
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 83.3% 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 ~15 days

Total

4

Last Release

3157d ago

### Community

Maintainers

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

---

Top Contributors

[![krissss](https://avatars.githubusercontent.com/u/10680903?v=4)](https://github.com/krissss "krissss (10 commits)")[![stivehu](https://avatars.githubusercontent.com/u/13046582?v=4)](https://github.com/stivehu "stivehu (2 commits)")

---

Tags

logredisredistargetyii2-extensionlogyii2extensionredisTarget

### Embed Badge

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

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

###  Alternatives

[lav45/yii2-activity-logger

Tools to store user activity log for Yii2

3456.3k](/packages/lav45-yii2-activity-logger)[kriss/yii2-log-reader

Yii2 log reader

1340.1k1](/packages/kriss-yii2-log-reader)

PHPackages © 2026

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