PHP code example of stein / monolog-railway-formatter
1. Go to this page and download the library: Download stein/monolog-railway-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/ */
stein / monolog-railway-formatter example snippets
use Monolog\Level;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Stein\Monolog\Formatter\RailwayFormatter;
$logger = new Logger('MyLogger', [
new StreamHandler('php://stderr', Level::Error, false),
new StreamHandler('php://stdout', Level::Debug)
])->setFormatter(new RailwayFormatter());