PHP code example of buzzlightyear / colour-logger
1. Go to this page and download the library: Download buzzlightyear/colour-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/ */
buzzlightyear / colour-logger example snippets
use App\Logging\ColourLogger;
// Basic usage
ColourLogger::text('blue')->log('This is a blue text');
// Complex styling
ColourLogger::text('blue')->background('red')->bold()->italic()->underline()->log('This message has red background and blue, bold, italic, underlined text');
// Logging complex data types with pretty-print JSON
ColourLogger::text('green')->json()->log(['key' => 'value', 'another_key' => 'another_value']);