esempla / yii2-log
Many Yii2 log targets
Installs: 857
Dependents: 0
Suggesters: 0
Security: 0
Type:yii2-extension
pkg:composer/esempla/yii2-log
Requires
- php: >=5.4.0
- yiisoft/yii2: 2.0.*
- yiisoft/yii2-composer: 2.0.*
Requires (Dev)
- codeception/codeception: 2.0.*
- yiisoft/yii2-elasticsearch: 2.0.*
- yiisoft/yii2-redis: 2.0.*
README
Installation
The preferred way to install this extension is through composer.
 add line to require section of composer.json
"esempla/yii2-log": "*"
Example Yii configuration
....
'components' => [
    'log' => [
        'targets' => [
            'logstash' =>   [
                'class' => 'esempla\\log\\LogstashTarget',
                'dsn' => 'tcp://logstash.esempla.srl:5044',
                'levels' => ['error', 'warning','info'],
                'index' => 'PROJECT_NAME'
            ]
        ]
        ....
Properties
- dsn, default- tcp://localhost:3333- URL to logstash service. Allowed schemas: tcp, udp, unix - for unix sock files.
- index, default- logstash- index to logstash service
- custom, default- []- array custom fields sended to logstash
Logstah guide
/docs/README.md