phprs\util\Logger::info PHP Метод

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

info log
public static info ( string $msg ) : void
$msg string
Результат void
    public static function info($msg)
    {
        if (self::$flags & self::INFO) {
            call_user_func(Logger::$writer, self::INFO, $msg);
        }
    }

Usage Example

Пример #1
0
 /**
  * @return void
  */
 function __construct()
 {
     $ok = false;
     if ($this->factory->getConfFile() === null) {
         $key = 'phprs_route3_' . sha1(serialize($this->factory->getConf()));
     } else {
         $key = 'phprs_route3_' . sha1($this->factory->getConfFile());
     }
     $this->impl = $this->cache->get($key, $ok);
     if ($ok && is_object($this->impl)) {
         Logger::info("router loaded from cache");
         return;
     }
     $this->impl = $this->factory->create('phprs\\Router');
     //缓存过期判断依据
     //检查接口文件是否有修改\新增
     $check_files = array_values($this->impl->getApiFiles());
     $check_dirs = array();
     foreach ($check_files as $file) {
         if (is_file($file)) {
             $check_dirs[] = dirname($file);
         }
     }
     $check_files = array_merge($check_files, $check_dirs);
     $check_files[] = $this->factory->getConfFile();
     $this->cache->set($key, $this->impl, 0, new FileExpiredChecker($check_files));
     //接口文件或者配置文件修改
 }
All Usage Examples Of phprs\util\Logger::info