seretalabs/monolog-fluentd-bundle
最新稳定版本:v0.5.0
Composer 安装命令:
composer require seretalabs/monolog-fluentd-bundle
包简介
Simple wrapper bundle for Symfony2 that extends Monolog with Fluentd support
README 文档
README
This bundle enables logging to the fluentd log concentrator from Symfony.
Fluentd is an open source datacollector and decouples your logging collection
and analysis tools from your project by sending all logs from deamons, apps
in front and backend to one single daemon and use filtering to selectively
forward to storage engine / analysis tools
fluentd handler for Monolog as a Symfony bundle.
Installation
Kernel
$bundles = array(
//..
new Seretalabs\MonologFluentdBundle\MonologFluentdBundle(),
);
Autoload:
$loader->registerNamespaces(array(
//..
'Seretalabs' => __DIR__.'/../vendor/bundles',
));
Configuration
Configure Monolog
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: fluentd
fluentd:
type: service
id: monolog_fluentd.monolog_handler
Configure monolog for fluentd:
monolog_fluentd:
# fluentd API host
host: localhost
# fluentd API port default 24224
port: 24224
# Level to be logged (defaults to DEBUG)
level: DEBUG
bubble: true
Usage
<?php use Monolog\Logger; $logger->debug('example.monolog', array('foo' => 'bar')); $logger->info('example.fluentd', array('fizz' => 'buzz')); // Fluentd: // 2013-10-11 01:00:00 +0900 dakatsuka.example.monolog: {"foo":"bar","level":"DEBUG"} // 2013-10-11 01:00:00 +0900 dakatsuka.example.fluentd: {"fizz":"buzz","level":"INFO"}
credits
This bundle uses [daktsuka](https://github.com/dakatsuka)'s fluentd handler for Monolog [https://github.com/dakatsuka/MonologFluentHandler]
统计信息
- 总下载量: 55.58k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2014-11-04