pocketmine\utils\MainLogger::getLogger PHP Метод

getLogger() публичный статический Метод

public static getLogger ( ) : MainLogger
Результат MainLogger
    public static function getLogger()
    {
        return static::$logger;
    }

Usage Example

Пример #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