Explorar o código

打印fcm推送结果

locky %!s(int64=3) %!d(string=hai) anos
pai
achega
d013a0d633
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      Service/GatewayService.py

+ 2 - 0
Service/GatewayService.py

@@ -58,6 +58,7 @@ class GatewayPushService:
     # android fcm 推送
     @staticmethod
     def android_fcm_push(nickname, app_bundle_id, token_val, n_time, event_type, msg_title, msg_text, image=''):
+        logger = logging.getLogger('info')
         try:
             serverKey = FCM_CONFIG[app_bundle_id]
             push_service = FCMNotification(api_key=serverKey)
@@ -74,6 +75,7 @@ class GatewayPushService:
                                                                      'default_light_settings': True,
                                                                      }
                                                        )
+            logger.info('fcm推送结果:{}'.format(result))
             return result
         except Exception as e:
             return repr(e)