PHP code example of dfar / logger
1. Go to this page and download the library: Download dfar/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/ */
dfar / logger example snippets
use Logger\AutoLoagger;
$composerLoader =
use \Monolog\Logger;
class TestLogger {
/**
* @var Logger
*/
public static $LOGGER;
public static function logDebug($param) {
self::$LOGGER->debug("this is debug message '$param'");
}
public static function logInfo($param) {
self::$LOGGER->info("this is info message '$param'");
}
public static function __afterload() {
self::$LOGGER->info("autoload works!");
self::$autoloadCnt++;
}
}