Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dinov3/logging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ def formatMessage(self, record):
if colored_kwargs is None:
return log

msg = record.msg % record.args if record.msg == "%s" else record.msg
raw_msg = record.getMessage()
msg = str(raw_msg)

index = log.rfind(msg, len(log) - len(msg))
# Can happen in some cases, like if the msg contains `%s` which
# have been replaced in `formatMessage`. Fallback to no colors
Expand Down