Jelajahi Sumber

优化日志打印

locky 7 bulan lalu
induk
melakukan
0bd813d27c
1 mengubah file dengan 0 tambahan dan 5 penghapusan
  1. 0 5
      Service/PushService.py

+ 0 - 5
Service/PushService.py

@@ -122,7 +122,6 @@ class PushObject:
         @return: bool
         """
         pem_path = os.path.join(BASE_DIR, APNS_CONFIG[app_bundle_id]['pem_path'])
-        LOGGER.info('IOS推送: app_bundle_id:{}, pem_path:{}'.format(app_bundle_id, pem_path))
         try:
             cli = apns2.APNSClient(mode=APNS_MODE, client_cert=pem_path)
             alert = apns2.PayloadAlert(title=msg_title, body=msg_text, launch_image=launch_image)
@@ -135,8 +134,6 @@ class PushObject:
                                     mutable_content=True)
             n = apns2.Notification(payload=payload, priority=apns2.PRIORITY_LOW)
             res = cli.push(n=n, device_token=token_val, topic=app_bundle_id)
-            LOGGER.info('IOS推送响应状态码{},token:{},uid:{},params:{}'
-                        .format(res.status_code, token_val, uid, json.dumps(push_data)))
             assert res.status_code == 200 or res.status_code == 410
             return True
         except Exception as e:
@@ -190,7 +187,6 @@ class PushObject:
                                                                          'default_light_settings': True,
                                                                          },
                                                            )
-            LOGGER.info('uid:{},evnet_type:{},time:{},fcm推送结果:{}'.format(uid, event_type, n_time, result))
             return True
         except Exception as e:
             LOGGER.info('uid:{},evnet_type:{},time:{},fcm推送异常:{}'.format(uid, event_type, n_time, repr(e)))
@@ -236,7 +232,6 @@ class PushObject:
             # Send a message to the device corresponding to the provided
             # registration token.
             result = messaging.send(message)
-            LOGGER.info('fcm推送结果:{}'.format(result))
             return True
         except Exception as e:
             LOGGER.info('fcm推送异常:{}'.format(repr(e)))