duncan3dc / climate-logger
Use league/climate with any PSR-3 compatible project
Installs: 584
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/duncan3dc/climate-logger
Requires
- php: ^5.6|^7.0
- league/climate: ^3.2
- psr/log: 1.0.0
Requires (Dev)
- mockery/mockery: ^0.9.4
- phpunit/phpunit: ^5.0
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
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.