Skip to content

itorso/php-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP easy logger helper

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

About

Basic logger to log string, array and PHP class.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages