Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

push_notifications: Hide "error" level messages from aioapns.

Alex Vandiver0b7cff2f22ef
diff --git a/zerver/lib/push_notifications.py b/zerver/lib/push_notifications.py
index b06d2a2b4ad..640bfe9679a 100644
--- a/zerver/lib/push_notifications.py
+++ b/zerver/lib/push_notifications.py
@@ -74,6 +74,10 @@ def get_apns_context() -> Optional[APNsContext]:
# import time.
import aioapns
+ # aioapns logs at "error" level for every non-successful request,
+ # which fills the logs; see https://github.com/Fatal1ty/aioapns/issues/15
+ logging.getLogger("aioapns").setLevel(logging.CRITICAL)
+
if settings.APNS_CERT_FILE is None:
return None