twistersfury/monolog-helpers

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

Adds Some Common Utility Helpers To Monolog

Maintainers

Package info

github.com/twistersfury/monolog-helpers

pkg:composer/twistersfury/monolog-helpers

Statistics

Installs: 550

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.5 2018-04-02 21:15 UTC

This package is not auto-updated.

Last update: 2024-06-19 13:03:27 UTC


README

This repo contains various helpers for use with monolog. For use with PHP 7.0 and Monolog 2.0.

Build Status

Processors

GlobalsProcessor

Creates a new record entry of 'php_globals'. This record will include all (or specified) $_ global variables in the current execution. Useful for debugging.

All Globals

use TwistersFury\Monolog\Processors\GlobalsProcessor;
$processor = new GlobalsProcessor();

Specified Globals

use TwistersFury\Monolog\Processors\GlobalsProcessor;
$processor = new GlobalsProcessor(
    [
        'post'    => true,
        'get'     => false,
        'request' => false,
        'server'  => true
    ]
);

BacktraceProcessor

Creates a new record entry of 'trace'. This record will include the stack trace. It will automatically exclude the most recent entries to ensure you don't get additional useless stack information. This exclusion is controllable on the construct.

Without Skip

use TwistersFury\Monolog\Processors\BacktraceProcessor;

$processor = new BacktraceProcessor();

With Skip

use TwistersFury\Monolog\Processors\BacktraceProcessor;

//The five most recent stacks will be ignored.
$processor = new BacktraceProcessor(5);