bilberrry / yii2-fluentd
Logging with Fluentd for Yii2
Installs: 3 384
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 2
Forks: 1
Type:yii2-extension
Requires
- php: >=5.4.0
- fluent/logger: v1.0.0
This package is auto-updated.
Last update: 2023-03-20 05:59:11 UTC
README
Logging with Fluentd for Yii2
Installation
You can install this extension with composer.
composer require bilberrry/yii2-fluentd
or add to composer.json
"bilberrry/yii2-fluentd": "0.1"
Usage
Add new log target to your configuration file.
Example configuration
... 'components' => [ 'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ [ 'class' => 'bilberrry\log\FluentdTarget', 'levels' => ['error', 'warning'], // Log levels 'host' => 'localhost', // Fluentd host 'port' => '24224', // Fluentd port 'options' => [], // Options for Fluentd client 'tagFormat' => 'app.%level' // Tag format, available placeholders: %date, %timestamp, %level ], ], ], ...
For options list check this source code.