From 8f0d75365fd8afb16924f616d5c02d14d75e9839 Mon Sep 17 00:00:00 2001 From: David Vogt Date: Thu, 31 Oct 2024 11:22:07 +0100 Subject: [PATCH] fix: do not log stacktrace on db reconnect This is confusing and spams the log despite no actual error happening. --- manabi/lock.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/manabi/lock.py b/manabi/lock.py index b48066b..67de876 100644 --- a/manabi/lock.py +++ b/manabi/lock.py @@ -300,9 +300,7 @@ def execute(self, *args, **kwargs): try: self._cursor.execute(*args, **kwargs) except (InterfaceError, OperationalError): - _logger.error( - f"Postgres connection lost, reconnecting. {''.join(traceback.format_stack())}" - ) + _logger.warn("Postgres connection lost, reconnecting") self.connect() self._cursor.execute(*args, **kwargs)