f1monkey/monolog-extensions

This package is abandoned and no longer maintained. No replacement package was suggested.

Additional handlers for monolog

1.0.0 2020-06-13 21:15 UTC

This package is auto-updated.

Last update: 2021-09-14 01:00:54 UTC


README

Handlers nad other usable (probably) things for monolog.

Install

$ composer require f1monkey/monolog-extensions

Handlers

LogstashHttpHandler

Writes log messages directly to Logstash using http input. It is a default SocketHandler with minor changes.

Usage:

services.yaml:

services:
    monolog.handler.logstash_handler:
        class: F1Monkey\MonologExtensions\Handler\LogstashHttpHandler
        arguments:
            $connectionString: '%env(LOGSTASH_HOST)%' #i.e. http://localhost:8080
        calls:
            - ['setFormatter', ['@monolog.formatter.logstash']]

packages/monolog.yaml:

monolog:
    handlers:
        logstash:
            type: service
            id: monolog.handler.logstash_handler
            channels: ["!event", "!doctrine"]
            level: debug