Skip to content

Commit

Permalink
Log connection or scrape failures as errors, not debug.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Harring committed Feb 23, 2018
1 parent 1f326ef commit f25ce5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prometheus_pgbouncer_exporter/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def collect(self):
success = False

except Exception as error:
logging.getLogger().debug("Unable fetch metrics from {dsn}".format(dsn=self.config.getDsnWithMaskedPassword()), extra={"exception": str(error)})
logging.getLogger().error("Unable fetch metrics from {dsn}".format(dsn=self.config.getDsnWithMaskedPassword()), extra={"exception": str(error)})

success = False
finally:
Expand Down Expand Up @@ -147,7 +147,7 @@ def _fetchMetrics(self, conn, query):

return cursor.fetchall()
except Exception as error:
logging.getLogger().debug("Unable run query {query} on {dsn}".format(query=query, dsn=self.config.getDsnWithMaskedPassword()), extra={"exception": str(error)})
logging.getLogger().error("Unable run query {query} on {dsn}".format(query=query, dsn=self.config.getDsnWithMaskedPassword()), extra={"exception": str(error)})

return False
finally:
Expand Down

0 comments on commit f25ce5d

Please sign in to comment.