/** * @brief 状态日志 * @return type */ public static function statsLog() { $logFile = dirname(__DIR__) . self::LOG_PATH . 'stats.log'; $objLogger = Logger::statsLog($logFile, Logger::DEBUG, !Logger::WEB_TRACE_ON, Logger::BACK_TRACE_ON); return $objLogger; }
/** * @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); }
/** * @brief 应用日志 * @return obj */ public static function log() { $objLogger = Logger::ahaSysLog('php://stdout', Logger::DEBUG, !Logger::WEB_TRACE_ON, Logger::BACK_TRACE_ON); return $objLogger; }