From c77259bfbbe6223c90829d74eff34d0550b9431e Mon Sep 17 00:00:00 2001 From: kingbri Date: Sat, 9 Mar 2024 15:40:37 -0500 Subject: [PATCH] Logger: Fix reformatting of message Use the reformatted message when splitting lines instead of the raw message to prevent exceptions. Signed-off-by: kingbri --- common/logger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/logger.py b/common/logger.py index ab617ec..370b1e1 100644 --- a/common/logger.py +++ b/common/logger.py @@ -51,10 +51,10 @@ def _log_formatter(record: dict) -> str: separator = " " * (9 - len(level.name)) message = unwrap(record.get("message"), "") - lines = message.splitlines() # Replace once loguru allows for turning off str.format message = message.replace("{", "{{").replace("}", "}}") + lines = message.splitlines() fmt = "" if len(lines) > 1: