From f25ce5d6d212ca7e144066a155fc3dd830bd2df5 Mon Sep 17 00:00:00 2001 From: Brian Harring <brian@cloudflare.com> Date: Thu, 22 Feb 2018 16:57:46 -0800 Subject: [PATCH] Log connection or scrape failures as errors, not debug. --- prometheus_pgbouncer_exporter/collector.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prometheus_pgbouncer_exporter/collector.py b/prometheus_pgbouncer_exporter/collector.py index b0749a6..dd0315a 100644 --- a/prometheus_pgbouncer_exporter/collector.py +++ b/prometheus_pgbouncer_exporter/collector.py @@ -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: @@ -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: