Do not log tracebacks for influxdb write errors (#23522)

* Do not log influxdb write exceptions

* Log exception name
This commit is contained in:
Anders Melchiorsen 2019-04-29 13:39:45 +02:00 committed by Andrew Sayre
parent 2245ee98e3
commit 471a26bde1

View file

@ -321,14 +321,12 @@ class InfluxThread(threading.Thread):
_LOGGER.debug("Wrote %d events", len(json))
break
except (exceptions.InfluxDBClientError,
requests.exceptions.RequestException,
IOError):
except (exceptions.InfluxDBClientError, IOError) as err:
if retry < self.max_tries:
time.sleep(RETRY_DELAY)
else:
if not self.write_errors:
_LOGGER.exception("Write error")
_LOGGER.error("Write error: %s", err)
self.write_errors += len(json)
def run(self):