Skip to content

Commit 2e360d6

Browse files
committed
rm unnecessary log
1 parent 7b2faba commit 2e360d6

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

packages/service-library/src/servicelib/rabbitmq/_rpc_router.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313

1414
DecoratedCallable = TypeVar("DecoratedCallable", bound=Callable[..., Any])
1515

16-
# NOTE: this is equivalent to http access logs
17-
_logger = logging.getLogger("rpc.access")
16+
17+
_logger = logging.getLogger(
18+
# NOTE: this logger is equivalent to http access logs
19+
"rpc.access"
20+
)
1821

1922

2023
def _create_func_msg(func, args: tuple[Any, ...], kwargs: dict[str, Any]) -> str:
@@ -64,10 +67,14 @@ async def _wrapper(*args, **kwargs):
6467
):
6568
raise
6669

67-
_logger.exception(
68-
"Unhandled exception on the rpc-server side. Re-raising as %s.",
70+
_logger.debug(
71+
"Unhandled exception on call %s on the rpc-server side: %s (%s). **Re-raising** as %s.",
72+
func.__name__,
73+
exc,
74+
f"{exc.__class__.__module__}.{exc.__class__.__name__}",
6975
RPCServerError.__name__,
7076
)
77+
7178
# NOTE: we do not return internal exceptions over RPC
7279
formatted_traceback = "\n".join(
7380
traceback.format_tb(exc.__traceback__)

0 commit comments

Comments
 (0)