staffim / splunk-bundle
此包已被弃用且不再维护。未建议替代包。
SplunkStorm支持的Symfony2扩展Monolog的包
dev-master
2013-06-18 10:36 UTC
Requires
- ext-curl: *
- symfony/monolog-bundle: *
This package is auto-updated.
Last update: 2022-02-01 12:23:26 UTC
README
关于
SplunkStorm 处理器作为Symfony包的 Monolog。
此包灵感来源于 LogglyBundle
注意:该包未与 Splunk 进行测试
安装
在您的composer.json中要求staffim/splunk-bundle
包并更新您的依赖项。
$ composer require staffim/splunk-bundle:*
将StaffimSplunkBundle添加到您的应用程序内核
public function registerBundles() { $bundles = array( ... new Staffim\SplunkBundle\StaffimSplunkBundle(), ... ); ... }
配置
配置Monolog
monolog: handlers: main: type: fingers_crossed action_level: error handler: splunk splunk: type: service id: staffim_splunk.monolog_handler
或缓冲处理程序
monolog: handlers: buffered_splunk: type: buffer level: debug handler: splunk splunk: type: service id: staffim_splunk.monolog_handler
或甚至是错误处理程序
services: my.monolog.exception_logger: public: false class: Symfony\Bridge\Monolog\Logger arguments: ["mole.monolog.exception_logger"] calls: - [pushHandler, ["@staffim_splunk.monolog_handler"]]
配置Splunk
staffim_splunk: # SplunkStorm access token token: ### # SplunkStorm project ID project: ### # SplunkStorm API host ((defaults to api.splunkstorm.com)) host: api.splunkstorm.com # Level to be logged (defaults to DEBUG) level: DEBUG bubble: true