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
This commit is contained in:
Julien Danjou 2016-08-02 14:25:33 +02:00
parent a59c759a54
commit 1c64f5ef2d

View File

@ -44,7 +44,7 @@ class Stats(object):
self.conf.statsd.user_id,
self.conf.statsd.project_id)
except indexer.ResourceAlreadyExists:
LOG.info("Resource %s already exists"
LOG.debug("Resource %s already exists"
% self.conf.statsd.resource_id)
else:
LOG.info("Created resource %s" % self.conf.statsd.resource_id)
@ -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: