Skip to content

Commit

Permalink
chg: exports (influxdb) - log warning message if export fails
Browse files Browse the repository at this point in the history
  • Loading branch information
RazCrimson committed Jun 29, 2024
1 parent 48103f1 commit 0e1d462
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions glances/exports/glances_influxdb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def export(self, name, columns, points):
try:
self.client.write_points(self._normalize(name, columns, points), time_precision="s")
except Exception as e:
# Log level set to debug instead of error (see: issue #1561)
logger.debug(f"Cannot export {name} stats to InfluxDB ({e})")
# Log level set to warning instead of error (see: issue #1561)
logger.warning(f"Cannot export {name} stats to InfluxDB ({e})")
else:
logger.debug(f"Export {name} stats to InfluxDB")
4 changes: 2 additions & 2 deletions glances/exports/glances_influxdb2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def export(self, name, columns, points):
try:
self.client.write(self.bucket, self.org, self._normalize(name, columns, points), time_precision="s")
except Exception as e:
# Log level set to debug instead of error (see: issue #1561)
logger.debug(f"Cannot export {name} stats to InfluxDB ({e})")
# Log level set to warning instead of error (see: issue #1561)
logger.warning(f"Cannot export {name} stats to InfluxDB ({e})")
else:
logger.debug(f"Export {name} stats to InfluxDB")

0 comments on commit 0e1d462

Please sign in to comment.