PHPackages                             macfly/yii2-stream-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. macfly/yii2-stream-log

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

macfly/yii2-stream-log
======================

Yii2 module, provide a cli to send log to elasticsearch asynchronously use redis as a local buffer

0.1.7(5y ago)016.3k1BSD-3-ClausePHP

Since Sep 13Pushed 5y ago1 watchersCompare

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

READMEChangelog (8)Dependencies (3)Versions (11)Used By (0)

yii2-stream-log
===============

[](#yii2-stream-log)

Yii2 module, provide a cli to send log to elasticsearch asynchronously use redis as a local buffer

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist "macfly/yii2-stream-log" "*"
```

or add

```
"macfly/yii2-stream-log": "*"
```

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

Configure
---------

[](#configure)

Configure **config/console.php** and **config/web.php** as follows

```
  'bootstrap' => [
      'log',
      'streamlog',
  ],
  'modules' => [
     ................
     'streamlog' => [
         'class' => 'macfly\streamlog\Module',
         'redisTarget' => [
             'exportInterval' => 1,
             'logVars'        => [],
             'logUser'        => true,
             'logApp'         => true,
             'logTracker'     => true,
             'logUserIp'      => true,
             'logSession'     => true,
             'userNameAt'     => 'username',
         ],
         'elasticsearchTarget' => [
            'indexDateFormat' => 'y-MM-dd', // Set date to append to index, will be yii-2018-10-24
        ],
    ],
    ................
  ],
```

Usage
-----

[](#usage)

Run the following to enable log streaming from redis to elasticsearch

```
php yii streamlog/sender/start
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.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 ~134 days

Recently: every ~78 days

Total

10

Last Release

2001d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/74924cc29f67eef7ca7640876dd3462974466ea683f8d059c70a33b3087d7230?d=identicon)[Macfly](/maintainers/Macfly)

---

Top Contributors

[![marty-macfly](https://avatars.githubusercontent.com/u/12715929?v=4)](https://github.com/marty-macfly "marty-macfly (4 commits)")[![phucnguyenvn](https://avatars.githubusercontent.com/u/19264169?v=4)](https://github.com/phucnguyenvn "phucnguyenvn (2 commits)")

---

Tags

logclielasticsearchredisyii2

### Embed Badge

![Health badge](/badges/macfly-yii2-stream-log/health.svg)

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

###  Alternatives

[index0h/yii2-log

Many Yii2 log targets

48208.1k](/packages/index0h-yii2-log)[lav45/yii2-activity-logger

Tools to store user activity log for Yii2

3459.5k](/packages/lav45-yii2-activity-logger)

PHPackages © 2026

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