From 79b308bc8c3c02ca6694e084f3c8b6691978d83b Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Wed, 8 Jul 2015 13:40:29 +0200 Subject: [PATCH] Use oslo.log in the zmq receiver The zmq receiver must allow to be configurable like any other openstack daemon. Change-Id: I8db72239d6be04c25bef37a539b7c4ecd457225b --- oslo_messaging/_cmd/zmq_receiver.py | 4 ++-- requirements.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/oslo_messaging/_cmd/zmq_receiver.py b/oslo_messaging/_cmd/zmq_receiver.py index cbcdfe88d..d65576ac4 100644 --- a/oslo_messaging/_cmd/zmq_receiver.py +++ b/oslo_messaging/_cmd/zmq_receiver.py @@ -18,10 +18,10 @@ import eventlet eventlet.monkey_patch() import contextlib -import logging import sys from oslo_config import cfg +from oslo_log import log from oslo_messaging._drivers import impl_zmq from oslo_messaging._executors import base # FIXME(markmc) @@ -33,7 +33,7 @@ CONF.register_opts(base._pool_opts) def main(): CONF(sys.argv[1:], project='oslo') - logging.basicConfig(level=logging.DEBUG) + log.setup(CONF, 'oslo.messaging') with contextlib.closing(impl_zmq.ZmqProxy(CONF)) as reactor: reactor.consume_in_thread() diff --git a/requirements.txt b/requirements.txt index 1b29f8a28..19651eea0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,6 +6,7 @@ pbr<2.0,>=0.11 oslo.config>=1.11.0 # Apache-2.0 oslo.context>=0.2.0 # Apache-2.0 +oslo.log>=1.2.0 # Apache-2.0 oslo.utils>=1.6.0 # Apache-2.0 oslo.serialization>=1.4.0 # Apache-2.0 oslo.service>=0.1.0 # Apache-2.0