# HG changeset patch # User Marcin Kuzminski # Date 2019-10-15 16:26:29 # Node ID 648bee25ec17ac2604aa287256d2cd8a2fa75238 # Parent e884ccc49159c20bb325b7b635f0b834d9e2414c api: don't log full API params as the upload ones can be too much for logging diff --git a/rhodecode/api/__init__.py b/rhodecode/api/__init__.py --- 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)