Beispiel #1
0
 public static function exception_handler($exception)
 {
     global $G_X;
     $msg = $exception->getMessage();
     XLogger::getInstance($G_X['prjstr'])->error($msg);
     //echo $msg;
     //exit;
 }
Beispiel #2
0
 /**
  * 取得日志类实例
  * @param string $logname psys,panalyse,pexam,pitem试
  * //1,系统管理   psys 2,题库试卷  pitem 3,在线测试   pexam 4,考试分析 panalyse
  * @return object
  */
 public static function getInstance($logname = 'pweb')
 {
     if (null === self::$_logname) {
         self::$_logname = $logname;
     }
     if (null === self::$_instance) {
         self::$_instance = new XLogger();
     }
     if ($logname !== self::$_logname) {
         self::$_logname = $logname;
         self::$_instance = new self();
     }
     return self::$_instance;
 }