Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/duncan3dc/climate-logger
Use your best friend for the terminal with your favourite PSR-3 compatible projects
https://github.com/duncan3dc/climate-logger
climate php php-league psr-3
Last synced: 4 days ago
JSON representation
Use your best friend for the terminal with your favourite PSR-3 compatible projects
- Host: GitHub
- URL: https://github.com/duncan3dc/climate-logger
- Owner: duncan3dc
- License: apache-2.0
- Created: 2015-03-02T18:21:06.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-04-28T13:13:37.000Z (over 5 years ago)
- Last Synced: 2024-10-01T07:12:55.146Z (about 1 month ago)
- Topics: climate, php, php-league, psr-3
- Language: PHP
- Size: 21.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# climate-logger
Use your best friend for the terminal with your favourite PSR-3 compatible projects[![Build Status](https://img.shields.io/travis/duncan3dc/climate-logger.svg)](https://travis-ci.org/duncan3dc/climate-logger)
[![Latest Version](https://img.shields.io/packagist/v/duncan3dc/climate-logger.svg)](https://packagist.org/packages/duncan3dc/climate-logger)## CLImate
Read all about CLImate [here](http://climate.thephpleague.com/)## PSR-3
Read all about PSR-3 [here](http://www.php-fig.org/psr/psr-3/)## Examples
Combine the two for simple terminal logging:```php
$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:
```php
$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:```php
$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](CHANGELOG.md) has been available since the beginning of time.