diff --git a/lib/extras.py b/lib/extras.py index b05b9d9c..fdda9527 100644 --- a/lib/extras.py +++ b/lib/extras.py @@ -409,7 +409,9 @@ class LoggingConnection(_connection): """ Public interface of the log method defined in initialize """ - return self._log()(*args, **kwargs) + log = self._log() + if log: + return self._log()(*args, **kwargs) def filter(self, msg, curs): """Filter the query before logging it.