diff --git a/kafka/conn.py b/kafka/conn.py index 80f17009c..d04acce3e 100644 --- a/kafka/conn.py +++ b/kafka/conn.py @@ -916,7 +916,7 @@ def close(self, error=None): with self._lock: if self.state is ConnectionStates.DISCONNECTED: return - log.info('%s: Closing connection. %s', self, error or '') + log.log(logging.ERROR if error else logging.INFO, '%s: Closing connection. %s', self, error or '') self._update_reconnect_backoff() self._sasl_auth_future = None self._protocol = KafkaProtocol(