Example #1
0
File: Log.php Project: eyehere/aha
 /**
  * @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;
 }
Example #2
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);
 }
Example #3
0
File: Sys.php Project: eyehere/aha
 /**
  * @brief 应用日志
  * @return obj
  */
 public static function log()
 {
     $objLogger = Logger::ahaSysLog('php://stdout', Logger::DEBUG, !Logger::WEB_TRACE_ON, Logger::BACK_TRACE_ON);
     return $objLogger;
 }
Example #4
0
File: Log.php Project: vucms/aha
 /**
  * @brief 监控日志
  * @return type
  */
 public static function monitor()
 {
     $logFile = dirname(__DIR__) . self::LOG_PATH . 'monitor.log';
     $objLogger = Logger::monitorLog($logFile, Logger::ERROR, Logger::WEB_TRACE_ON, Logger::BACK_TRACE_ON);
     return $objLogger;
 }