Skip to content

Commit

Permalink
refactor: Make it more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Jul 16, 2024
1 parent c4a9353 commit 30226e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ai/backend/kernel/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def filter(self, record: logging.LogRecord) -> bool:
filtered_traceback.append(tb)
lines = [" Traceback:"]
for tb in filtered_traceback:
short_path = Path(tb.filename).relative_to(self.site_prefix)
short_path = tb.filename.removeprefix(self.site_prefix).removeprefix("/")
lines.append(f" {short_path} (L{tb.lineno}): {tb.name}()")
record.exc_text = "\n".join(lines)
return True
Expand Down

0 comments on commit 30226e4

Please sign in to comment.