From 6b4f100db27f3f8f98a0be2cb63d5582bb905656 Mon Sep 17 00:00:00 2001 From: kingbri Date: Sun, 10 Mar 2024 01:24:50 -0500 Subject: [PATCH] Logger: Escape tags Angle brackets should be escaped to avoid mistaken color formatting. 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 370b1e17..6258d412 100644 --- a/common/logger.py +++ b/common/logger.py @@ -53,7 +53,7 @@ def _log_formatter(record: dict) -> str: message = unwrap(record.get("message"), "") # Replace once loguru allows for turning off str.format - message = message.replace("{", "{{").replace("}", "}}") + message = message.replace("{", "{{").replace("}", "}}").replace("<", "\<") lines = message.splitlines() fmt = ""