2017 © Pedro Peláez
 

yii2-extension yii2-stream-log

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

image

macfly/yii2-stream-log

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

  • Saturday, March 31, 2018
  • by Macfly
  • Repository
  • 1 Watchers
  • 0 Stars
  • 741 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 2 Versions
  • 30 % Grown

The README.md

yii2-stream-log

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

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

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

or add, (*4)

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

to the require section of your composer.json file., (*5)

Configure

Configure config/console.php and config/web.php as follows, (*6)

  '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

Run the following to enable log streaming from redis to elasticsearch, (*7)

php yii streamlog/sender/start

The Versions

31/03 2018

dev-master

9999999-dev

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

  Sources   Download

BSD-3-Clause

The Requires

 

by Charles DELFLY

log yii2 redis elasticsearch cli

13/09 2017

0.0.1

0.0.1.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

by Charles DELFLY

log yii2 redis elasticsearch cli