From fe510987200589b94a765c19b5a4413856563231 Mon Sep 17 00:00:00 2001 From: Marcin Kuzminski Date: Tue, 15 Oct 2019 18:26:29 +0200 Subject: [PATCH] api: don't log full API params as the upload ones can be too much for logging --- rhodecode/api/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rhodecode/api/__init__.py b/rhodecode/api/__init__.py index eaf13749..87c6f346 100644 --- a/rhodecode/api/__init__.py +++ b/rhodecode/api/__init__.py @@ -333,6 +333,7 @@ def setup_request(request): raise JSONRPCError("Content-Length is 0") raw_body = request.body + log.debug("Loading JSON body now") try: json_body = json.loads(raw_body) except ValueError as e: @@ -359,7 +360,7 @@ def setup_request(request): request.rpc_params = json_body['args'] \ if isinstance(json_body['args'], dict) else {} - log.debug('method: %s, params: %s', request.rpc_method, request.rpc_params) + log.debug('method: %s, params: %.10240r', request.rpc_method, request.rpc_params) except KeyError as e: raise JSONRPCError('Incorrect JSON data. Missing %s' % e)