PHP code example of fabcam / console-logger

1. Go to this page and download the library: Download fabcam/console-logger 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/ */

    

fabcam / console-logger example snippets


$output->styles('annoy', ['text' => 'yellow', 'blink' => true]);
$output->styles('http_response', ['text' => 'yellow']);
$output->styles('http_request', ['text' => 'cyan']);

protected static $_styles = [
    'emergency' => ['text' => 'red'],
    'alert' => ['text' => 'red'],
    'critical' => ['text' => 'red'],
    'error' => ['text' => 'red'],
    'warning' => ['text' => 'yellow'],
    'info' => ['text' => 'cyan'],
    'debug' => ['text' => 'yellow'],
    'success' => ['text' => 'green'],
    'comment' => ['text' => 'blue'],
    'question' => ['text' => 'magenta'],
    'notice' => ['text' => 'cyan']
];

$this->addBehavior('ConsoleLogger.Log')