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
1 changed files with 2 additions and 4 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue