Procházet zdrojové kódy

去掉api_request_log日志

lizhen_gitee před 9 měsíci
rodič
revize
58e68ff849

+ 3 - 3
application/api/library/ExceptionHandle.php

@@ -13,7 +13,7 @@ class ExceptionHandle extends Handle
 
     public function render(Exception $e)
     {
-        return parent::render($e);
+        //return parent::render($e);
         $statuscode = $code = 500;
         $msg = $e->getMessage();
         // 验证异常
@@ -32,9 +32,9 @@ class ExceptionHandle extends Handle
         $result = ['code' => $code, 'msg' => $msg, 'time' => time(), 'data' => null];
 
         //记录app异常返回结果
-        if(defined('API_REQUEST_ID')) { //记录app正常返回结果
+        /*if(defined('API_REQUEST_ID')) { //记录app正常返回结果
             db('api_request_log')->where('id',API_REQUEST_ID)->update(['result'=>json_encode($result)]);
-        }
+        }*/
 
         return json($result, $statuscode);
     }

+ 2 - 2
application/common/controller/Api.php

@@ -79,7 +79,7 @@ class Api
         // 控制器初始化
         $this->_initialize();
         //日志
-        $this->request_log();
+        //$this->request_log();
         //用户活跃
         $this->user_active();
 
@@ -234,7 +234,7 @@ class Api
         ];
 
         //日志
-        $this->request_log_update($result);
+        //$this->request_log_update($result);
 
         // 如果未设置类型则自动判断
         $type = $type ? $type : ($this->request->param(config('var_jsonp_handler')) ? 'jsonp' : $this->responseType);