Ejemplo n.º 1
0
 /**
  * @brief 静态魔术方法获取log实例
  * @param string $name
  * @param array $arguments
  * @return obj
  */
 public static function __callStatic($name, $arguments)
 {
     $logFile = isset($arguments[0]) && is_string($arguments[0]) ? $arguments[0] : false;
     if (false === $logFile) {
         throw new \Exception("Log {$name} file name is not allowed null");
     }
     $logLevel = isset($arguments[1]) ? $arguments[1] : \Aha\Log\Logger::DEBUG;
     $webTrace = isset($arguments[2]) ? $arguments[2] : false;
     $backTrace = isset($arguments[3]) ? $arguments[3] : false;
     return \Aha\Log\Logger::getLoggerInstance($name, $logFile, $logLevel, $webTrace, $backTrace);
 }