using stack info in logging
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user