From 0aec9fe2b07c3bb305d788ebe3f57d08ead4be09 Mon Sep 17 00:00:00 2001 From: howardlee Date: Tue, 8 Nov 2016 14:03:28 +0800 Subject: [PATCH] Unify the usage of the log module 1. What is the problem? In tricircle, some files use oslo_log, while others use logging. The oslo.log(logging) configuration library provides standardized configuration for all openstack projects. I think different files in tricircle should use a same logging module and it's better to use oslo_log. 2. What is the solution to the problem? Replace logging module with oslo_log. 3. What the features need to be implemented to the Tricircle to realize the solution? No new features Change-Id: Ib3221f763dbe410b4252e5188d13a5824813846e --- cmd/api.py | 3 +-- cmd/xjob.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cmd/api.py b/cmd/api.py index 230d72dc..06fbc319 100644 --- a/cmd/api.py +++ b/cmd/api.py @@ -16,7 +16,6 @@ # Much of this module is based on the work of the Ironic team # see http://git.openstack.org/cgit/openstack/ironic/tree/ironic/cmd/api.py -import logging as std_logging import sys from oslo_config import cfg @@ -53,7 +52,7 @@ def main(): restapp.serve(service, CONF, workers) LOG.info(_LI("Configuration:")) - CONF.log_opt_values(LOG, std_logging.INFO) + CONF.log_opt_values(LOG, logging.INFO) restapp.wait() diff --git a/cmd/xjob.py b/cmd/xjob.py index fdc2754b..219204e8 100644 --- a/cmd/xjob.py +++ b/cmd/xjob.py @@ -21,7 +21,6 @@ import eventlet if __name__ == "__main__": eventlet.monkey_patch() -import logging as std_logging import sys from oslo_config import cfg @@ -53,7 +52,7 @@ def main(): xservice.serve(xservice.create_service(), workers) LOG.info(_LI("Configuration:")) - CONF.log_opt_values(LOG, std_logging.INFO) + CONF.log_opt_values(LOG, logging.INFO) xservice.wait()