Browse Source

接口日志

lizhen_gitee 2 months ago
parent
commit
f5fcf7e295
1 changed files with 2 additions and 2 deletions
  1. 2 2
      application/common/controller/Api.php

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

@@ -432,13 +432,13 @@ class Api
 
         if ($this->logType === 1){
             if (strlen(json_encode($log_result['data'])) > 1000) {
-                $log_result['data'] = '数据太多,不记录';
+//                $log_result['data'] = '数据太多,不记录';
             }
             LogUtil::info('result', 'Api-Middleware-Log', 'request_log', $log_result);
         }else{
             if(defined('API_REQUEST_ID')) { //记录app正常返回结果
                 if(strlen(json_encode($log_result['data'])) > 1000) {
-                    $log_result['data'] = '数据太多,不记录';
+//                    $log_result['data'] = '数据太多,不记录';
                 }
                 db('api_request_log')->where('id',API_REQUEST_ID)->update(['result'=>json_encode($log_result,JSON_UNESCAPED_UNICODE)]);
             }