diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-02-20 11:36:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-20 11:36:50 +0000 |
commit | b2200a869007f1b10b6f7d57618f1fedb3ad8908 (patch) | |
tree | 81a3047f8b479a849647d06c26ac38778ef74019 /synapse/push/httppusher.py | |
parent | Fix TaskStopped exceptions when outbound requests time out (#4690) (diff) | |
download | synapse-b2200a869007f1b10b6f7d57618f1fedb3ad8908.tar.xz |
Logging improvements for the pusher (#4691)
Diffstat (limited to 'synapse/push/httppusher.py')
-rw-r--r-- | synapse/push/httppusher.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py index 87fa7f006a..98d8d9560b 100644 --- a/synapse/push/httppusher.py +++ b/synapse/push/httppusher.py @@ -333,10 +333,10 @@ class HttpPusher(object): defer.returnValue([]) try: resp = yield self.http_client.post_json_get_json(self.url, notification_dict) - except Exception: - logger.warn( - "Failed to push event %s to %s", - event.event_id, self.name, exc_info=True, + except Exception as e: + logger.warning( + "Failed to push event %s to %s: %s %s", + event.event_id, self.name, type(e), e, ) defer.returnValue(False) rejected = [] @@ -367,10 +367,10 @@ class HttpPusher(object): } try: resp = yield self.http_client.post_json_get_json(self.url, d) - except Exception: - logger.warn( - "Failed to send badge count to %s", - self.name, exc_info=True, + except Exception as e: + logger.warning( + "Failed to send badge count to %s: %s %s", + self.name, type(e), e, ) defer.returnValue(False) rejected = [] |