diff options
author | Matthew Hodgson <matthew@matrix.org> | 2018-06-10 12:26:14 +0300 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2018-06-10 12:26:14 +0300 |
commit | c96d882a02924a26f69c75cb988b06f3015d7578 (patch) | |
tree | 4b2fd1bea90831955841dfb33753ac553c439104 /synapse/http/client.py | |
parent | Merge branch 'develop' into matthew/filter_members (diff) | |
parent | Merge branch 'master' into develop (diff) | |
download | synapse-c96d882a02924a26f69c75cb988b06f3015d7578.tar.xz |
Merge branch 'develop' into matthew/filter_members
Diffstat (limited to 'synapse/http/client.py')
-rw-r--r-- | synapse/http/client.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/synapse/http/client.py b/synapse/http/client.py index 4d4eee3d64..8064a84c5c 100644 --- a/synapse/http/client.py +++ b/synapse/http/client.py @@ -19,7 +19,7 @@ from OpenSSL.SSL import VERIFY_NONE from synapse.api.errors import ( CodeMessageException, MatrixCodeMessageException, SynapseError, Codes, ) -from synapse.http import cancelled_to_request_timed_out_error +from synapse.http import cancelled_to_request_timed_out_error, redact_uri from synapse.util.async import add_timeout_to_deferred from synapse.util.caches import CACHE_SIZE_FACTOR from synapse.util.logcontext import make_deferred_yieldable @@ -90,7 +90,8 @@ class SimpleHttpClient(object): # counters to it outgoing_requests_counter.labels(method).inc() - logger.info("Sending request %s %s", method, uri) + # log request but strip `access_token` (AS requests for example include this) + logger.info("Sending request %s %s", method, redact_uri(uri)) try: request_deferred = self.agent.request( @@ -105,14 +106,14 @@ class SimpleHttpClient(object): incoming_responses_counter.labels(method, response.code).inc() logger.info( "Received response to %s %s: %s", - method, uri, response.code + method, redact_uri(uri), response.code ) defer.returnValue(response) except Exception as e: incoming_responses_counter.labels(method, "ERR").inc() logger.info( "Error sending request to %s %s: %s %s", - method, uri, type(e).__name__, e.message + method, redact_uri(uri), type(e).__name__, e.message ) raise e |