diff --git a/radicale/app/__init__.py b/radicale/app/__init__.py index 48b7b7f3..4bad79ad 100644 --- a/radicale/app/__init__.py +++ b/radicale/app/__init__.py @@ -98,13 +98,13 @@ class Application(ApplicationPartDelete, ApplicationPartHead, self._mask_passwords = configuration.get("logging", "mask_passwords") self._max_content_length = configuration.get("server", "max_content_length") self._max_resource_size = configuration.get("server", "max_resource_size") - logger.info("max_content_length to: %d bytes (%sbytes)", self._max_content_length, utils.format_int(self._max_content_length, binary=True)) + logger.info("max_content_length set to: %d bytes (%sbytes)", self._max_content_length, utils.format_unit(self._max_content_length, binary=True)) if (self._max_resource_size > (self._max_content_length * 0.8)): max_resource_size_limited = int(self._max_content_length * 0.8) - logger.warning("max_resource_size capped to: %d bytes (%sbytes) (from %d to 80%% of max_content_length)", max_resource_size_limited, utils.format_int(max_resource_size_limited, binary=True), self._max_resource_size) + logger.warning("max_resource_size set to: %d bytes (%sbytes) (capped from %d to 80%% of max_content_length)", max_resource_size_limited, utils.format_unit(max_resource_size_limited, binary=True), self._max_resource_size) self._max_resource_size = max_resource_size_limited else: - logger.info("max_resource_size set to: %d bytes (%sbytes)", self._max_resource_size, utils.format_int(self._max_resource_size, binary=True)) + logger.info("max_resource_size set to: %d bytes (%sbytes)", self._max_resource_size, utils.format_unit(self._max_resource_size, binary=True)) self._bad_put_request_content = configuration.get("logging", "bad_put_request_content") logger.info("log bad put request content: %s", self._bad_put_request_content) self._request_header_on_debug = configuration.get("logging", "request_header_on_debug") diff --git a/radicale/utils.py b/radicale/utils.py index 14c0f0f3..5c0f6c03 100644 --- a/radicale/utils.py +++ b/radicale/utils.py @@ -303,7 +303,7 @@ def format_ut(unixtime: int) -> str: return r -def format_int(value: int, binary: bool = False) -> str: +def format_unit(value: float, binary: bool = False) -> str: if binary: if value > UNIT_G: value = value / UNIT_G