esempla / yii2-log
Many Yii2 log targets
0.8
2019-04-18 13:22 UTC
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
, defaulttcp://localhost:3333
- URL to logstash service. Allowed schemas: tcp, udp, unix - for unix sock files.index
, defaultlogstash
- index to logstash servicecustom
, default[]
- array custom fields sended to logstash
Logstah guide
/docs/README.md