chg: exports (influxdb) - log warning message if export fails

pull/2860/head
Bharath Vignesh J K 2024-06-30 01:33:51 +05:30
parent 48103f167e
commit 0e1d462c69
2 changed files with 4 additions and 4 deletions

View File

@ -156,7 +156,7 @@ class Export(GlancesExport):
try: try:
self.client.write_points(self._normalize(name, columns, points), time_precision="s") self.client.write_points(self._normalize(name, columns, points), time_precision="s")
except Exception as e: except Exception as e:
# Log level set to debug instead of error (see: issue #1561) # Log level set to warning instead of error (see: issue #1561)
logger.debug(f"Cannot export {name} stats to InfluxDB ({e})") logger.warning(f"Cannot export {name} stats to InfluxDB ({e})")
else: else:
logger.debug(f"Export {name} stats to InfluxDB") logger.debug(f"Export {name} stats to InfluxDB")

View File

@ -164,7 +164,7 @@ class Export(GlancesExport):
try: try:
self.client.write(self.bucket, self.org, self._normalize(name, columns, points), time_precision="s") self.client.write(self.bucket, self.org, self._normalize(name, columns, points), time_precision="s")
except Exception as e: except Exception as e:
# Log level set to debug instead of error (see: issue #1561) # Log level set to warning instead of error (see: issue #1561)
logger.debug(f"Cannot export {name} stats to InfluxDB ({e})") logger.warning(f"Cannot export {name} stats to InfluxDB ({e})")
else: else:
logger.debug(f"Export {name} stats to InfluxDB") logger.debug(f"Export {name} stats to InfluxDB")