PHP PSR-3 compatible loggers
- PHP >= 5.3
- Composer psr/log ^1.0
Install directly via Composer:
$ composer require phyrexia/log
<?php
require 'vendor/autoload.php';
use Phyrexia\Log\FileLogger;
//Instantiate a FileLogger logger
$logger = new FileLogger('/tmp/some_file.log');
//Log an error
$logger->error('An error occured! :(');
//Log an info
$logger->info('It works! :)');
...