travail/log-minimal

travail/log-minimal

v0.1.0 2014-05-01 05:06 UTC

This package is auto-updated.

Last update: 2024-12-14 19:27:59 UTC


README

NAME

\Log\Minimal - Minimal but customizable logger.

SYNOPSIS

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

INSTALLATION

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"
    }
]

DEPENDENCIES

\Log\Minimal has the dependency on the following:

METHODS

debugf

void debugf(string $formatd [, mixed $args [, mixed $...]])

infof

void debugf(string $formatd [, mixed $args [, mixed $...]])

warnf

void debugf(string $formatd [, mixed $args [, mixed $...]])

critf

void debugf(string $formatd [, mixed $args [, mixed $...]])

Parameters

The same as the built-in function sprintf.

ENVIRONMENT VALUES

$_ENV['LM_COLOR']

$_ENV['LM_DEBUG']

$_ENV['LM_LOG_DEVEL']

CUSTOMIZE

\Log\Minimal::$color

\Log\Minimal::$debug

\Log\Minimal::$log_level

\Log\Minimal::$print

\Log\Minimal::$trace_level

AUTHOR

travail

THANKS TO

Masahiro Nagano <kazeburo {at} gmail.com}>

SEE ALSO

Log::Minimal