itorso / logger
PHP easy logger helper
dev-master
2018-01-29 09:52 UTC
Requires
- php: >=5.6.0
- monolog/monolog: ^1.23
This package is not auto-updated.
Last update: 2024-04-20 13:42:31 UTC
README
Basic logger to log string, array and PHP class.
Installation
Download logger as composer package:
$ composer require itorso/logger
Example Usage
$logger = new Logger\Logger(); $logger->debug('It works!');
It will output a log file like <project_folder>/var/log/log.log
$logger = new Logger\Logger('custom_log'); $logger->error('Something goes wrong...');
It will output a log file like <project_folder>/var/log/custom_log.log
$myArr = ['1','2','x' => 'y']; $logger = new Logger\Logger(); $logger->info($myArr);
It will output the beautify version of the array in the log file
$myInstance = new MyClass(); $logger = new Logger\Logger(); $logger->info($myInstance);
It will output the beautify version of all the methods available for that class