Răsfoiți Sursa

验证验证码接口添加日志

guanhailong 2 ani în urmă
părinte
comite
ad17cd981f
1 a modificat fișierele cu 6 adăugiri și 0 ștergeri
  1. 6 0
      Controller/SuperPasswordTool.py

+ 6 - 0
Controller/SuperPasswordTool.py

@@ -8,6 +8,8 @@
 """
 import datetime
 import time
+import logging
+
 
 from django.db import transaction
 
@@ -38,6 +40,8 @@ class SuperPasswordView(View):
         tko = TokenObject(
             request.META.get('HTTP_AUTHORIZATION'))
         lang = request_dict.get('lang', tko.lang)
+        logger = logging.getLogger('info')
+        logger.info("传参语言{}".format(lang))
         response = ResponseObject(lang)
         if tko.code != 0:
             return response.json(tko.code)
@@ -197,7 +201,9 @@ class SuperPasswordView(View):
         @param authcode:验证码
         @return:
         """
+        logger = logging.getLogger('info')
         authcode = request_dict.get('authcode', None)
+        logger.info("----查询状态打印authcode{}".format(authcode))
         if authcode:
             authcode = CommonService.decode_data(authcode)
             if not len(authcode) == 6: