peng 1 سال پیش
والد
کامیت
73c2f6a03e
1فایلهای تغییر یافته به همراه4 افزوده شده و 3 حذف شده
  1. 4 3
      Service/PushService.py

+ 4 - 3
Service/PushService.py

@@ -227,10 +227,11 @@ class PushObject:
             push.notification = jpush.notification(android=android)
             push.platform = jpush.all_
             res = push.send()
+            LOGGER.info("uid:{},time:{},极光推送返回值:{}".format(nickname, n_time, res.json()))
             assert res.status_code == 200
             return True
         except Exception as e:
-            LOGGER.info('极光推送异常:{}'.format(repr(e)))
+            LOGGER.info('uid:{},time:{},极光推送异常:{}'.format(nickname, n_time, repr(e)))
             return False
 
     @staticmethod
@@ -485,10 +486,10 @@ class PushObject:
             }
             # 进行推送
             response = requests.post(url, data=data)
-            LOGGER.info("魅族推送结果:{}".format(response.json()))
+            LOGGER.info("uid:{},time:{},魅族推送结果:{}".format(uid, n_time, response.json()))
             return True
         except Exception as e:
-            LOGGER.info("魅族推送异常:{}".format(repr(e)))
+            LOGGER.info("uid:{},time:{},魅族推送异常:{}".format(uid, n_time, repr(e)))
             return False
 
     @staticmethod