duncan3dc/climate-logger

This package is abandoned and no longer maintained. The author suggests using the league/climate package instead.

Use league/climate with any PSR-3 compatible project

0.4.0 2017-06-17 17:52 UTC

This package is auto-updated.

Last update: 2022-02-01 12:52:58 UTC


README

Use your best friend for the terminal with your favourite PSR-3 compatible projects

Build Status Latest Version

CLImate

Read all about CLImate here

PSR-3

Read all about PSR-3 here

Examples

Combine the two for simple terminal logging:

$somethingThatLogs->setLogger(new \duncan3dc\CLImate\Logger);

By default a logger instance will hide DEBUG and log everything else, you can set a specific level like so:

$logger = new \duncan3dc\CLImate\Logger(\Psr\Log\LogLevel::DEBUG);
$somethingThatLogs->setLogger($logger);

Advanced

You can pass your own customised instance of CLImate to the logger:

$climate = new \League\CLImate\CLImate;
$climate->style->addCommand("debug", ["yellow", "background_black"]);
$logger = new \duncan3dc\CLImate\Logger(LogLevel::INFO, $climate);

# Now my debug information will be yellow and black
$somethingThatLogs->setLogger($logger);

Changelog

A Changelog has been available since the beginning of time.