using stack info in logging

This commit is contained in:
2025-03-20 14:06:32 +01:00
parent a4604d3dc4
commit 16c926c2e7
2 changed files with 2 additions and 6 deletions

View File

@@ -1,6 +1,5 @@
from __future__ import annotations
import traceback
import typing as t
from collections.abc import Callable
from functools import wraps
@@ -239,12 +238,9 @@ def wrap_result(
status = ResultWrapper(
result=NotSet(), exception=err, code_on_error=code_on_error
)
fmt_exc = traceback.format_exception(err)
exc_str = "".join(fmt_exc)
logger.error(
"An exception in routine %s occurred:\n%s",
"An exception in routine %s occurred, stack trace:",
func.__name__,
exc_str,
stack_info=True,
)