PHP code example of skyzyx / monolog-json-pretty-print-formatter
1. Go to this page and download the library: Download skyzyx/monolog-json-pretty-print-formatter library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
skyzyx / monolog-json-pretty-print-formatter example snippets
use Monolog\Handler\StreamHandler;
use Monolog\Logger;
use Skyzyx\Monolog\Formatter\JsonPrettyPrintFormatter;
$logger = new Logger('AwesomeSauce');
$handler = new StreamHandler('/var/log/awesomesauce.log', Logger::DEBUG);
$handler->setFormatter(new JsonPrettyPrintFormatter());
$logger->pushHandler($handler);