Browse Source

打印华为推送响应

locky 2 years ago
parent
commit
d18a4b5557
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Service/HuaweiPushService/HuaweiPushService.py

+ 2 - 2
Service/HuaweiPushService/HuaweiPushService.py

@@ -58,10 +58,10 @@ class HuaweiPushObject:
             # Case 3: use certifi Library
             # Case 3: use certifi Library
             import certifi
             import certifi
             response = messaging.send_message(message, verify_peer=certifi.where())
             response = messaging.send_message(message, verify_peer=certifi.where())
-            print('response is ', json.dumps(vars(response)))
+            logger.info('华为推送响应: {}'.format(json.dumps(vars(response))))
             assert (response.code == '80000000')
             assert (response.code == '80000000')
         except Exception as e:
         except Exception as e:
-            print(repr(e))
+            logger.info('华为推送异常: {}'.format(repr(e)))
 
 
     @staticmethod
     @staticmethod
     def android_notification(msg_title, msg_text):
     def android_notification(msg_title, msg_text):