pocketmine\utils\MainLogger::getLogger PHP Method

getLogger() public static method

public static getLogger ( ) : MainLogger
return MainLogger
    public static function getLogger()
    {
        return static::$logger;
    }

Usage Example

Esempio n. 1
0
 public static function log($logger, $flag, $msg, $timeout = 5)
 {
     if (isset(self::$msgs[$flag])) {
         if (microtime(true) - self::$msgs[$flag] < $timeout) {
             return;
         }
     }
     self::$msgs[$flag] = microtime(true);
     if ($logger instanceof \Logger) {
         $logger->notice($msg);
     } else {
         MainLogger::getLogger()->notice($msg);
     }
 }
All Usage Examples Of pocketmine\utils\MainLogger::getLogger