staffim/splunk-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

staffim/splunk-bundle

Composer 安装命令:

composer require staffim/splunk-bundle

包简介

Bundle for Symfony2 that extends Monolog for SplunkStorm support

README 文档

README

About

SplunkStorm handler for Monolog as a Symfony bundle.

The bundle is inspired from LogglyBundle

Note: The bundle did not testing with Splunk

Installation

Require the staffim/splunk-bundle package in your composer.json and update your dependencies.

$ composer require staffim/splunk-bundle:*

Add the StaffimSplunkBundle to your application's kernel:

    public function registerBundles()
    {
        $bundles = array(
            ...
            new Staffim\SplunkBundle\StaffimSplunkBundle(),
            ...
        );
        ...
    }

Configuration

Configure Monolog

monolog:
    handlers:
        main:
            type:         fingers_crossed
            action_level: error
            handler:      splunk
        splunk:
            type: service
            id: staffim_splunk.monolog_handler

or buffered handler

monolog:
    handlers:
        buffered_splunk:
            type: buffer
            level: debug
            handler: splunk
        splunk:
            type: service
            id: staffim_splunk.monolog_handler

or even error handler

services:
    my.monolog.exception_logger:
        public:    false
        class:     Symfony\Bridge\Monolog\Logger
        arguments: ["mole.monolog.exception_logger"]
        calls:
            - [pushHandler, ["@staffim_splunk.monolog_handler"]]

Configure 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

统计信息

  • 总下载量: 114
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-01-27