diff --git a/src/eddn/Gateway.py b/src/eddn/Gateway.py index d10d50e..79f6eb3 100644 --- a/src/eddn/Gateway.py +++ b/src/eddn/Gateway.py @@ -208,7 +208,7 @@ def parse_and_error_handle(data: bytes) -> str: # semi-useful error message, so do so. try: logger.error( - "Error - JSON parse failed (%d, '%s', '%s', '%s', '%s', '%s') from %s:\n%s\n", + "Error - JSON parse failed (%d, '%s', '%s', '%s', '%s', '%s') from [%s]:\n%s\n", request.content_length, "<>", "<>", @@ -251,7 +251,7 @@ def parse_and_error_handle(data: bytes) -> str: parsed_message ) logger.info( - "Accepted (%d, '%s', '%s', '%s', '%s', '%s') from %s", + "Accepted (%d, '%s', '%s', '%s', '%s', '%s') from [%s]", request.content_length, uploader_id, software_name, @@ -274,7 +274,7 @@ def parse_and_error_handle(data: bytes) -> str: parsed_message ) logger.error( - "Failed Validation '%s' (%d, '%s', '%s', '%s', '%s', '%s') from %s", + "Failed Validation '%s' (%d, '%s', '%s', '%s', '%s', '%s') from [%s]", str(validation_results.messages), request.content_length, uploader_id, @@ -314,7 +314,7 @@ def upload() -> str: try: logger.error( f"gzip error ({request.content_length}, '<>', '<>', '<>'" - ", '<>', '<>') from {get_remote_address()}" + ", '<>', '<>') from [{get_remote_address()}]" ) except Exception as e: @@ -328,7 +328,7 @@ def upload() -> str: # They probably sent an encoded POST, but got the key/val wrong. response.status = 400 # TODO: Maybe just `{exc}` ? - logger.error("MalformedUploadError from %s: %s", get_remote_address(), str(exc)) + logger.error("MalformedUploadError from [%s]: %s", get_remote_address(), str(exc)) return "FAIL: Malformed Upload: " + str(exc)