Logger: Fix reformatting of message
Use the reformatted message when splitting lines instead of the raw message to prevent exceptions. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
4d09226364
commit
c77259bfbb
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue