Skip to content

Commit

Permalink
fix CONFIG_LOG_PRINT_TRACEBACK
Browse files Browse the repository at this point in the history
  • Loading branch information
rymarczy committed Jan 22, 2025
1 parent 3529988 commit 75ccecc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/odin/utils/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def failed(self, exception: Exception) -> None:
# Last 2 stacks are ProcessLog calls and should be dropped
# This is for exceptions that are not 'raised'
# 'raised' exceptions will also be logged to sys.stderr
if os.environ["CONFIG_LOG_PRINT_TRACEBACK"] != "False":
if os.getenv("CONFIG_LOG_PRINT_TRACEBACK", default="True") != "False":
for stack_entry in traceback.format_stack()[:-2]:
for line in stack_entry.strip("\n").split("\n"):
LOGGER.error(f"uuid={self.uuid}, {line.strip('\n')}")
Expand Down

0 comments on commit 75ccecc

Please sign in to comment.