mehr-als-nix/monolog-fluent-handler

1.1.0 2017-01-18 09:08 UTC

This package is auto-updated.

Last update: 2024-02-29 02:28:25 UTC


README

Build Status

Monolog handler for Fluent. Also supporting data from optional field "extra", e.g. set by IntrospectionProcessor.

Usage

<?php

use Monolog\Logger;
use MehrAlsNix\Monolog\Handler\FluentHandler;

$logger = new Logger('name');
$logger->pushHandler(new FluentHandler());

$logger->alert('Something wrong.');

Symfony

example) app/config/config.yml

services:
    acme.monolog.fluent_handler:
        class: MehrAlsNix\Monolog\Handler\FluentHandler
        arguments:
            - "%acme.fluent.uri%"

monolog:
    handlers:
        fluent:
            type: service
            id: acme.monolog.fluent_handler
            level: debug

Installation

composer require mehr-als-nix/monolog-fluent-handler

Authors

Mattias Meiner - mattiasmeiner@gmail.com - https://github.com/MattiasAlsNix

started by ATO Keisuke - ksato@otobank.co.jp - https://github.com/riaf

License

[LICENSE:MIT]