php-extended/php-basic-console-logger

A very basic psr-3 compliant logger to log activity in the console

3.0.2 2020-07-12 23:08 UTC

This package is auto-updated.

Last update: 2020-07-12 21:08:53 UTC


README

A very basic psr-3 compliant logger to log activity in the console.

coverage build status

Installation

The installation of this library is made via composer. Download composer.phar from their website. Then add to your composer.json :

	"require": {
		...
		"php-extended/php-basic-console-logger": "^3"
		...
	}

Then run php composer.phar update to install this library. The autoloading of all classes of this library is made through composer's autoloader.

Basic Usage

This library gives a very basic psr-3 logger. Use it as described in the docs of the psr-3 : https://www.php-fig.org/psr/psr-3/


use PhpExtended\Logger\BasicConsoleLogger;

$logger = new BasicConsoleLogger();

$logger->error('Nah.');	// echo YYYY-MM-DD HH:mm:SS [  ERROR  ] Nah.\n

License

MIT (See license file).