Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 1.31 KB

README.md

File metadata and controls

41 lines (30 loc) · 1.31 KB

climate-logger

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.