itorso/logger

PHP easy logger helper

Installs: 42

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/itorso/logger

dev-master 2018-01-29 09:52 UTC

This package is not auto-updated.

Last update: 2025-12-27 21:49:40 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