PHP code example of fyre / log

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

    

fyre / log example snippets


use Fyre\Log\Log;

Log::clear();

$config = Log::getConfig($key);

$config = Log::getConfig();

$key = Log::getKey($logger);

$hasConfig = Log::hasConfig($key);

$isLoaded = Log::isLoaded($key);

$logger = Log::load($config);

Log::setConfig($key, $options);

Log::setConfig($config);

$unloaded = Log::unload($key);

$logger = Log::use($key);

$canHandle = $logger->canHandle($level);

$logger->handle($type, $message);

Log::setConfig($key, $options);

$logger = Log::use($key);

Log::emergency($message, $data);   // 1
Log::alert($message, $data);       // 2
Log::critical($message, $data);    // 3
Log::error($message, $data);       // 4
Log::warning($message, $data);     // 5
Log::notice($message, $data);      // 6
Log::info($message, $data);        // 7
Log::debug($message, $data);       // 8