PHP code example of duncan3dc / climate-logger

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

    

duncan3dc / climate-logger example snippets


$somethingThatLogs->setLogger(new \duncan3dc\CLImate\Logger);

$logger = new \duncan3dc\CLImate\Logger(\Psr\Log\LogLevel::DEBUG);
$somethingThatLogs->setLogger($logger);

$climate = new \League\CLImate\CLImate;
$climate->style->addCommand("debug", ["yellow", "background_black"]);
$logger = new \duncan3dc\CLImate\Logger(LogLevel::INFO, $climate);

# Now my debug information will be yellow and black
$somethingThatLogs->setLogger($logger);