mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Do not log tracebacks for influxdb write errors (#23522)
* Do not log influxdb write exceptions * Log exception name
This commit is contained in:
parent
2245ee98e3
commit
471a26bde1
@ -321,14 +321,12 @@ class InfluxThread(threading.Thread):
|
|||||||
|
|
||||||
_LOGGER.debug("Wrote %d events", len(json))
|
_LOGGER.debug("Wrote %d events", len(json))
|
||||||
break
|
break
|
||||||
except (exceptions.InfluxDBClientError,
|
except (exceptions.InfluxDBClientError, IOError) as err:
|
||||||
requests.exceptions.RequestException,
|
|
||||||
IOError):
|
|
||||||
if retry < self.max_tries:
|
if retry < self.max_tries:
|
||||||
time.sleep(RETRY_DELAY)
|
time.sleep(RETRY_DELAY)
|
||||||
else:
|
else:
|
||||||
if not self.write_errors:
|
if not self.write_errors:
|
||||||
_LOGGER.exception("Write error")
|
_LOGGER.error("Write error: %s", err)
|
||||||
self.write_errors += len(json)
|
self.write_errors += len(json)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user