\Log\Minimal - Minimal but customizable logger.
use \Log\Minimal;
require_once '/path/to/vendor/autoload.php';
Minimal::critf('%s', 'foo'); // 2014-01-28T17:24:34 [CRITICAL] foo at example.php line 12
Minimal::warnf('%d %s %s', 1, 'foo', $uri);
Minimal::infof('foo');
Minimal::debugf('foo') // Print if \Log\Minimal::$debug is true
To install this package into your project via composer, add the following snippet to your composer.json
. Then run composer install
.
"require": {
"travail/log-minimal": "dev-master"
}
If you want to install from github, add the following:
"repositories": [
{
"type": "vcs",
"url": "git@github.com:travail/php-Log-Minimal.git"
}
]
\Log\Minimal has the dependency on the following:
void debugf(string $formatd [, mixed $args [, mixed $...]])
void debugf(string $formatd [, mixed $args [, mixed $...]])
void debugf(string $formatd [, mixed $args [, mixed $...]])
void debugf(string $formatd [, mixed $args [, mixed $...]])
The same as the built-in function sprintf
.
travail
Masahiro Nagano <kazeburo {at} gmail.com}>