From 607407cebbad273b41e0414e736b4489f8afebcf Mon Sep 17 00:00:00 2001 From: Thomas Ilsche Date: Sat, 25 Sep 2021 14:13:53 +0200 Subject: [PATCH] reduce verbosity of reconnect warnings Replace the full traceback with a simple inline string of the exception of the failed reconnect attempt. The full traceback requires many lines and appear frequently in logs (default every 5 s). At the same time, the traceback offers very little useful extra information in addition to the exception string. --- aio_pika/robust_connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aio_pika/robust_connection.py b/aio_pika/robust_connection.py index 7b5043e0..648878fb 100644 --- a/aio_pika/robust_connection.py +++ b/aio_pika/robust_connection.py @@ -141,11 +141,11 @@ async def connect(self, timeout: TimeoutType = None, **kwargs): await self.__cleanup_connection(e) log.warning( - 'Connection attempt to "%s" failed. ' + 'Connection attempt to "%s" failed: %s. ' "Reconnecting after %r seconds.", self, + e, self.reconnect_interval, - exc_info=True, ) except asyncio.CancelledError as e: await self.__cleanup_connection(e)