Browse Source

打印日志2

tanghongbin 4 years ago
parent
commit
e8c7333aef
1 changed files with 4 additions and 2 deletions
  1. 4 2
      Controller/ShadowController.py

+ 4 - 2
Controller/ShadowController.py

@@ -54,8 +54,6 @@ def generate_utk(request):
 
 # 设备影子更新
 def update_device_shadow(request):
-    LogUtil.write_log(
-        log='shadow----------{time}'.format(time=time.strftime('%Y-%m-%d-%H-%M-%S', time.localtime())))
     request.encoding = 'utf-8'
     response = ResponseObject()
     if request.method == 'POST':
@@ -67,6 +65,10 @@ def update_device_shadow(request):
     etk = request_dict.get('etk', None)
     eto = ETkObject(etk)
     uid = eto.uid
+    log = 'push----------{time}'.format(time=time.strftime('%Y-%m-%d-%H-%M-%S', time.localtime()))
+    log += '\n'
+    log += '\tuid=' + uid
+    LogUtil.write_log(log=log)
     if uid:
         # 重置按钮
         is_reset = request_dict.get('is_reset', None)