From 1c64f5ef2d8ea861a5d268f0a5068617eb0ca1f1 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 2 Aug 2016 14:25:33 +0200 Subject: [PATCH] statsd: tweak logging This logs only "resource already exist" on debug, so it sounds less warny for operators. Log something when the daemon is started and ready to process. Change-Id: Ia67c7679fa46d8f0c2fb48aed9fd4132a992733a --- gnocchi/statsd.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gnocchi/statsd.py b/gnocchi/statsd.py index 693a063ae..8a337d388 100644 --- a/gnocchi/statsd.py +++ b/gnocchi/statsd.py @@ -44,8 +44,8 @@ class Stats(object): self.conf.statsd.user_id, self.conf.statsd.project_id) except indexer.ResourceAlreadyExists: - LOG.info("Resource %s already exists" - % self.conf.statsd.resource_id) + LOG.debug("Resource %s already exists" + % self.conf.statsd.resource_id) else: LOG.info("Created resource %s" % self.conf.statsd.resource_id) self.gauges = {} @@ -186,6 +186,9 @@ def start(): loop.call_later(conf.statsd.flush_delay, _flush) transport, protocol = loop.run_until_complete(listen) + LOG.info("Started on %s:%d" % (conf.statsd.host, conf.statsd.port)) + LOG.info("Flush delay: %d seconds" % conf.statsd.flush_delay) + try: loop.run_forever() except KeyboardInterrupt: