PHP code example of spazzmarticus / monolog-batchstreamhandler
1. Go to this page and download the library: Download spazzmarticus/monolog-batchstreamhandler 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/ */
spazzmarticus / monolog-batchstreamhandler example snippets
use SpazzMarticus\BatchStreamHandler\BatchStreamHandler;
use Monolog\Handler\BufferHandler;
use Monolog\Logger;
$batchStreamHandler = new BatchStreamHandler('supsi-looking.log');
//Optional - Envelop the records with head and foot lines
$batchStreamHandler->pushHeadLine('-------');
$batchStreamHandler->pushFootLine('=======');
$bufferHandler = new BufferHandler($batchStreamHandler);
$logger = new Logger('supsi');
$logger->pushHandler($bufferHandler);
//PewPew - Do your stuff here