From b4682ea43b56a8782b7568d30243e4e619a9a13b Mon Sep 17 00:00:00 2001 From: CasVT Date: Wed, 6 Mar 2024 17:27:40 +0100 Subject: [PATCH] Fixed file clearing when LL goes debug to debug --- backend/logging.py | 3 +++ frontend/api.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/logging.py b/backend/logging.py index e096fd3..a93ad74 100644 --- a/backend/logging.py +++ b/backend/logging.py @@ -115,6 +115,9 @@ def set_log_level( clear_file (bool, optional): Empty the debug logging file. Defaults to True. """ + if LOGGER.level == level: + return + LOGGER.debug(f'Setting logging level: {level}') LOGGER.setLevel(level) diff --git a/frontend/api.py b/frontend/api.py index 7d10312..9f28584 100644 --- a/frontend/api.py +++ b/frontend/api.py @@ -720,7 +720,7 @@ def api_admin_settings(inputs: Dict[str, Any]): elif request.method == 'PUT': LOGGER.info(f'Submitting admin settings: {inputs}') - + hosting_changes = any( inputs[s] is not None for s in ('host', 'port', 'url_prefix')