From 199cb16dd8f2632915c0ae17072bfecf194b97f9 Mon Sep 17 00:00:00 2001 From: Simon Oliver Tveit Date: Wed, 22 Feb 2023 10:05:13 +0100 Subject: [PATCH] Use loggers own method for formatting log message --- python/nav/web/sortedstats/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/nav/web/sortedstats/views.py b/python/nav/web/sortedstats/views.py index 4777e0c08c..7dc0d91283 100644 --- a/python/nav/web/sortedstats/views.py +++ b/python/nav/web/sortedstats/views.py @@ -98,7 +98,7 @@ def process_form(form): if result and not result.data: result = None except InvalidCacheBackendError as e: - _logger.error("Error accessing cache for ranked statistics: %s".format(e)) + _logger.error("Error accessing cache for ranked statistics: %s", e) result = None if not result: result = collect_result(view, timeframe, rows) @@ -129,7 +129,7 @@ def collect_result(view, timeframe, rows): cache = get_cache() cache.set(cache_key, result, timeout=timeout) except InvalidCacheBackendError as e: - _logger.error("Error accessing cache for ranked statistics: %s".format(e)) + _logger.error("Error accessing cache for ranked statistics: %s", e) return result