PHP code example of mattyg / monolog-cascade
1. Go to this page and download the library: Download mattyg/monolog-cascade 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/ */
mattyg / monolog-cascade example snippets
use MattyG\MonologCascade\Cascade;
$config = json_decode(file_get_contents("/path/to/some/config.json"), true);
// Or if you prefer YAML
$config = yaml_parse_file("/path/to/some/config.yml");
// configure your loggers
Cascade::configure($config);
Cascade::getLogger('myApp')->info('Well, that works!');
Cascade::getLogger('myApp')->error('Maybe not...');
self::$extraOptionHandlers = array(
'\Monolog\Formatter\LineFormatter' => array(
'