bilberrry / yii2-fluentd
该包已被弃用且不再维护。没有建议的替代包。
为 Yii2 使用 Fluentd 进行日志记录
0.1.1
2016-04-06 10:09 UTC
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
为 Yii2 使用 Fluentd 进行日志记录
安装
您可以使用 composer 安装此扩展。
composer require bilberrry/yii2-fluentd
或者在 composer.json
中添加
"bilberrry/yii2-fluentd": "0.1"
使用方法
将新的日志目标添加到您的配置文件中。
示例配置
... '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 ], ], ], ...
有关选项列表,请查看此 源代码。