Coder Social home page Coder Social logo

abame / monolog-fluentd-bundle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from musement/monolog-fluentd-bundle

0.0 0.0 0.0 66 KB

Symfony bundle to enable logging to fluentd via monolog.

Home Page: https://github.com/musement/monolog-fluentd-bundle

License: MIT License

PHP 100.00%

monolog-fluentd-bundle's Introduction

GitHub release Project Status Percentage of issues still open Average time to resolve an issue composer.lock Dependencies Status License


musement/monolog-fluentd-bundle

This Symfony bundle enables logging to fluentd via monolog.

Fluentd is an open source data collector, it decouples data sources from backend systems by providing a unified logging layer in between.

Install

composer require musement/monolog-fluentd-bundle

Register the bundle in Symfony

<?php
// AppKernel.php

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            ...
            new Musement\MonologFluentdBundle\MusementMonologFluentdBundle(),
        );
        ...
    }
}

You can avoid loading the bundle (i.e. include it only in staging/prod environment) by means of something such as the following:

$bundles = array(
   ...
);
if (in_array($this->getEnvironment(), array('production', 'staging'))) {
    $bundles[] = new Musement\MonologFluentdBundle\MusementMonologFluentdBundle();
}

Configuration

These are the default parameters:

musement_monolog_fluentd:
  host: localhost
  port: 24224
  options: []
  level: debug
  tag_fmt: '{{channel}}.{{level_name}}'
  exceptions: true

You can modify them in config.yml or parameters.yml

You may load the handler as a service

monolog:
  handlers:
    musement_monolog_fluentd:
      type: service
      id: musement_monolog_fluentd.fluentd_handler

How to run the tests

phpunit -c phpunit.xml.dist

Copyright

© Musement S.p.A.

monolog-fluentd-bundle's People

Contributors

borisbabic avatar dralbert avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.