Skip to content

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

License

Notifications You must be signed in to change notification settings

duncan3dc/climate-logger

Repository files navigation

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.

About

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

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published