Skip to content

Commit

Permalink
Logger: Fix reformatting of message
Browse files Browse the repository at this point in the history
Use the reformatted message when splitting lines instead of the
raw message to prevent exceptions.

Signed-off-by: kingbri <[email protected]>
  • Loading branch information
bdashore3 committed Mar 9, 2024
1 parent 4d09226 commit c77259b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c77259b

Please sign in to comment.