2017 © Pedro Peláez
 

yii2-extension yii2-elasticsearch-log

Yii 2.0 Elasticsearch log target

image

airani/yii2-elasticsearch-log

Yii 2.0 Elasticsearch log target

  • Sunday, October 15, 2017
  • by airani
  • Repository
  • 1 Watchers
  • 1 Stars
  • 50 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 4 % Grown

The README.md

Yii 2.0 Elasticsearch log target

Installation

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

Either run, (*2)

php composer.phar require -vv --prefer-dist airani/yii2-elasticsearch-log

or add below line to the composer.json and run php composer.phar update -vv --prefer-dist --profile, (*3)

"airani/yii2-elasticsearch-log": "~1.0"

Usage

Config elasticsearch log target in config file like below code. with set extraFields property in log target config you can set more extra fields to log results., (*4)

'components' => [
    // ...
    'log' => [
        'targets' => [
            [
                'class' => 'airani\log\ElasticsearchTarget',
                'levels' => ['error', 'warning'],
                'index' => 'yii',
                'type' => 'log',
                'db' => 'elasticsearch',
                'extraFields' => [
                    'ip' => function ($app) {
                        return $app->request->getUserIP();
                    }
                ]
            ],
        ],
    ],
],

The Versions

15/10 2017

dev-master

9999999-dev

Yii 2.0 Elasticsearch log target

  Sources   Download

BSD-3-Clause

The Requires

 

by Ali Irani

log yii2 elasticsearch

15/10 2017

v1.0.1

1.0.1.0

Yii 2.0 Elasticsearch log target

  Sources   Download

BSD-3-Clause

The Requires

 

by Ali Irani

log yii2 elasticsearch

14/10 2017

v1.0

1.0.0.0

Yii 2.0 Elasticsearch log target

  Sources   Download

BSD-3-Clause

The Requires

 

by Ali Irani

log yii2 elasticsearch