Skip to content

The extension of JsonFormatter of Monolog, which pretty prints json and supports unicode. Does not escape slashes.

License

Notifications You must be signed in to change notification settings

tatocaster/monolog-json-unicode-pretty-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The extension of JsonFormatter of Monolog, which pretty prints json and supports unicode. Does not escape slashes. extended from JsonFormatter , so it is fully compatible with parent.

Requirements

Required

  • [PHP] 5.4.0+

Examples

use Monolog\Handler\StreamHandler;
use Monolog\Logger;
use Tatocaster\Monolog\Formatter\JsonPrettyUnicodePrintFormatter;

$logger = new Logger('MyLogger');
$handler = new StreamHandler('/var/log/mylogger.log', Logger::INFO);
$handler->setFormatter(new JsonPrettyUnicodePrintFormatter());
$logger->pushHandler($handler);

Installation

with composer

{
    "require": {
        "tatocaster/monolog-json-unicode-pretty-formatter": ">=1.0"
    }
}

Pull Requests are welcome

Copyright (c) 2017 Tato Kutalia.

Licensed for use under the terms of the [MIT] license.

About

The extension of JsonFormatter of Monolog, which pretty prints json and supports unicode. Does not escape slashes.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages