Enable logging before using it

Bug #1200530

Change-Id: I086353c93fae0f6ec74d16a485c215c1b3815ee6
This commit is contained in:
Yong Sheng Gong 2013-07-12 17:18:42 +08:00
parent bd18990d78
commit 47381ff70a
4 changed files with 4 additions and 4 deletions

View File

@ -25,7 +25,6 @@ from oslo.config import cfg
from paste import deploy
from neutron.api.v2 import attributes
from neutron.common import legacy
from neutron.common import utils
from neutron.openstack.common.db.sqlalchemy import session as db_session
from neutron.openstack.common import log as logging
@ -108,8 +107,6 @@ def parse(args):
cfg.CONF(args=args, project='neutron',
version='%%prog %s' % neutron_version.release_string())
legacy.modernize_quantum_config(cfg.CONF)
# Validate that the base_mac is of the correct format
msg = attributes._validate_regex(cfg.CONF.base_mac,
attributes.MAC_PATTERN)

View File

@ -135,5 +135,6 @@ def main():
config.neutron_config = CONF
CONF()
#TODO(gongysh) enable logging
legacy.modernize_quantum_config(CONF)
CONF.command.func(config, CONF.command.name)

View File

@ -23,6 +23,7 @@ import random
from oslo.config import cfg
from neutron.common import config
from neutron.common import legacy
from neutron import context
from neutron.openstack.common import importutils
from neutron.openstack.common import log as logging
@ -80,6 +81,7 @@ class NeutronApiService(WsgiService):
# Log the options used when starting if we're in debug mode...
config.setup_logging(cfg.CONF)
legacy.modernize_quantum_config(cfg.CONF)
# Dump the initial option values
cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
service = cls(app_name)

View File

@ -58,8 +58,8 @@ def main():
config.register_root_helper(cfg.CONF)
cfg.CONF(project='neutron')
legacy.modernize_quantum_config(cfg.CONF)
config.setup_logging(cfg.CONF)
legacy.modernize_quantum_config(cfg.CONF)
mgr = manager.LbaasAgentManager(cfg.CONF)
svc = LbaasAgentService(