Using oslo_log instead of logging.

Optimize the code

Change-Id: I59a8934bc9c81c3b5e4d4e861e3a29ff8cffbaae
This commit is contained in:
zhuzeyu 2017-01-24 15:20:15 +08:00
parent c771ad1a1b
commit 231c884529
2 changed files with 2 additions and 5 deletions

View File

@ -10,7 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
import logging
import os
import pecan
@ -84,7 +83,7 @@ def build_server(conf):
LOG.info(_LI('Starting server in PID %s') % os.getpid())
LOG.info(_LI('Configuration:'))
conf.log_opt_values(LOG, logging.INFO)
conf.log_opt_values(LOG, log.INFO)
if host == '0.0.0.0':
LOG.info(_LI(

View File

@ -11,8 +11,6 @@
# License for the specific language governing permissions and limitations
# under the License.
import logging
from oslo_config import cfg
from oslo_log import log
from oslo_policy import opts as policy_opts
@ -44,7 +42,7 @@ def prepare_service(args=None, conf=None, config_files=None):
keystone_client.setup_keystoneauth(conf)
log.setup(conf, 'vitrage')
conf.log_opt_values(LOG, logging.DEBUG)
conf.log_opt_values(LOG, log.DEBUG)
messaging.setup()
return conf