Ver código fonte

设备重置添加打印信息

locky 4 anos atrás
pai
commit
502abc4485
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4 0
      Controller/ShadowController.py

+ 4 - 0
Controller/ShadowController.py

@@ -16,6 +16,8 @@
 # 生产环境
 # shadow.dvema.com
 # 设备影子更新
+import logging
+
 from Object.LogUtil import LogUtil
 from Object.ResponseObject import ResponseObject
 from Object.ETkObject import ETkObject
@@ -74,6 +76,8 @@ def update_device_shadow(request):
     # 传1则重置设备信息
     if is_reset == '1':
         # 重置语音提示
+        logger = logging.getLogger('info')
+        logger.info('设备重置')
         uid_channel_qs = UidChannelSetModel.objects.filter(uid__uid=uid)
         if uid_channel_qs.exists():
             uid_channel_qs.update(voice_prompt_intelligent_mute=0, voice_prompt_status=0, voice_prompt_enter=0,