瀏覽代碼

V2推送异常日志更改

linhaohong 1 年之前
父節點
當前提交
405c31e5b9
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      Controller/DetectControllerV2.py

+ 4 - 2
Controller/DetectControllerV2.py

@@ -50,7 +50,7 @@ class NotificationV2View(View):
         dealings_type = int(request_dict.get('dealingsType', 0))
         detection = int(request_dict.get('detection', 0))
         button = request_dict.get('button', '1')
-
+        uid = ""
         # 参数校验
         if not all([channel, n_time]):
             return JsonResponse(status=200, data={'code': 444, 'msg': 'param is wrong'})
@@ -161,7 +161,9 @@ class NotificationV2View(View):
                 uid, n_time, event_type, json.dumps(res_data)))
             return JsonResponse(status=200, data=res_data)
         except Exception as e:
-            TIME_LOGGER.info('V2推送接口异常,error_line:{},error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
+            TIME_LOGGER.info(
+                'V2推送接口异常, etk:{}, uid:{},error_line:{},error_msg:{}'.format(etk, uid, e.__traceback__.tb_lineno,
+                                                                                   repr(e)))
             data = {
                 'error_line': e.__traceback__.tb_lineno,
                 'error_msg': repr(e)