Skip to content

Commit

Permalink
Enable logging before using it
Browse files Browse the repository at this point in the history
Bug #1200530

Change-Id: I086353c93fae0f6ec74d16a485c215c1b3815ee6
  • Loading branch information
gongysh committed Jul 13, 2013
1 parent bd18990 commit 47381ff
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions neutron/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
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
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions neutron/db/migration/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 2 additions & 0 deletions neutron/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
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
Expand Down Expand Up @@ -80,6 +81,7 @@ def create(cls, app_name='neutron'):
# 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)
Expand Down
2 changes: 1 addition & 1 deletion neutron/services/loadbalancer/drivers/haproxy/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 47381ff

Please sign in to comment.