cyntelli / yii2-log-fluentd
Logging with Fluentd for Yii2
Installs: 4 879
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=7.1.3
- fluent/logger: v1.0.0
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2024-10-26 15:42:31 UTC
README
Logging with Fluentd for Yii2.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require "cyntelli/yii2-log-fluentd" "*"
or add
"cyntelli/yii2-log-fluentd" : "*"
to the require
section of your application's composer.json
file.
Usage
Add Fluentd target to your log component config:
<?php return [ ... 'components' => [ 'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, // 'flushInterval' => 1, 'targets' => [ 'fluentdTarget' => [ 'class' => 'cyntelli\log\FluentdTarget', 'levels' => ['error', 'warning'], // Log levels // 'exportInterval' => 1, 'host' => 'host', // Fluentd host 'port' => '24224', // Fluentd port 'options' => [], // Options for Fluentd client 'tag' => 'app' // Tag ] ], ], ], ... ];