Skip to content

fjyuu/monolog-ltsv-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LTSV Formatter

StyleCI Latest Stable Version Total Downloads Latest Unstable Version License

An LTSV Formatter for Monolog

Usage

use Monolog\Level;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Hikaeme\Monolog\Formatter\LtsvFormatter;

$log = new Logger('DEMO');
$handler = new StreamHandler('php://stdout', Level::Error);
$handler->setFormatter(new LtsvFormatter('Y-m-d H:i:s'));
$log->pushHandler($handler);

$log->error('Something happened', ['detail1' => 'foo', 'detail2' => 'bar']);
// time:2016-01-02 11:58:03<tab>level:ERROR<tab>message:Something happened<tab>detail1:foo<tab>detail2:bar

Installation

composer require hikaeme/monolog-ltsv-formatter

About

LTSV Formatter for Monolog

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages