oslo: remove usage of oslo.log verbose option
The option was deprecated a long time ago, and will be removed in one of the next library releases, which will render neutron broken if we keep using the option. More details: http://lists.openstack.org/pipermail/openstack-dev/2016-May/095166.html Closes-Bug: #1586066 Change-Id: I884b4cc3ed04e4b5489e265c146666e04eb1bc27
This commit is contained in:
@@ -98,8 +98,6 @@ def get_log_args(conf, log_file_name, **kwargs):
|
|||||||
cmd_args = []
|
cmd_args = []
|
||||||
if conf.debug:
|
if conf.debug:
|
||||||
cmd_args.append('--debug')
|
cmd_args.append('--debug')
|
||||||
if conf.verbose:
|
|
||||||
cmd_args.append('--verbose')
|
|
||||||
if (conf.log_dir or conf.log_file):
|
if (conf.log_dir or conf.log_file):
|
||||||
cmd_args.append('--log-file=%s' % log_file_name)
|
cmd_args.append('--log-file=%s' % log_file_name)
|
||||||
log_dir = None
|
log_dir = None
|
||||||
|
|||||||
@@ -127,7 +127,6 @@ def configure(conf):
|
|||||||
config.init(sys.argv[1:])
|
config.init(sys.argv[1:])
|
||||||
conf.set_override('log_dir', cfg.CONF.conf_dir)
|
conf.set_override('log_dir', cfg.CONF.conf_dir)
|
||||||
conf.set_override('debug', True)
|
conf.set_override('debug', True)
|
||||||
conf.set_override('verbose', True)
|
|
||||||
config.setup_logging()
|
config.setup_logging()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -71,13 +71,7 @@ class NeutronApiService(WsgiService):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(cls, app_name='neutron'):
|
def create(cls, app_name='neutron'):
|
||||||
|
# Setup logging early
|
||||||
# Setup logging early, supplying both the CLI options and the
|
|
||||||
# configuration mapping from the config file
|
|
||||||
# We only update the conf dict for the verbose and debug
|
|
||||||
# flags. Everything else must be set up in the conf file...
|
|
||||||
# Log the options used when starting if we're in debug mode...
|
|
||||||
|
|
||||||
config.setup_logging()
|
config.setup_logging()
|
||||||
service = cls(app_name)
|
service = cls(app_name)
|
||||||
return service
|
return service
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ class NeutronConfigFixture(ConfigFixture):
|
|||||||
'core_plugin': 'neutron.plugins.ml2.plugin.Ml2Plugin',
|
'core_plugin': 'neutron.plugins.ml2.plugin.Ml2Plugin',
|
||||||
'service_plugins': ','.join(service_plugins),
|
'service_plugins': ','.join(service_plugins),
|
||||||
'auth_strategy': 'noauth',
|
'auth_strategy': 'noauth',
|
||||||
'verbose': 'True',
|
|
||||||
'debug': 'True',
|
'debug': 'True',
|
||||||
},
|
},
|
||||||
'database': {
|
'database': {
|
||||||
@@ -259,7 +258,6 @@ class L3ConfigFixture(ConfigFixture):
|
|||||||
self._prepare_config_with_linuxbridge_agent()
|
self._prepare_config_with_linuxbridge_agent()
|
||||||
self.config['DEFAULT'].update({
|
self.config['DEFAULT'].update({
|
||||||
'debug': 'True',
|
'debug': 'True',
|
||||||
'verbose': 'True',
|
|
||||||
'test_namespace_suffix': self._generate_namespace_suffix(),
|
'test_namespace_suffix': self._generate_namespace_suffix(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -540,7 +540,6 @@ class TestLogArgs(base.BaseTestCase):
|
|||||||
|
|
||||||
def test_log_args_without_log_dir_and_file(self):
|
def test_log_args_without_log_dir_and_file(self):
|
||||||
conf_dict = {'debug': True,
|
conf_dict = {'debug': True,
|
||||||
'verbose': False,
|
|
||||||
'log_dir': None,
|
'log_dir': None,
|
||||||
'log_file': None,
|
'log_file': None,
|
||||||
'use_syslog': True,
|
'use_syslog': True,
|
||||||
@@ -554,14 +553,12 @@ class TestLogArgs(base.BaseTestCase):
|
|||||||
|
|
||||||
def test_log_args_without_log_file(self):
|
def test_log_args_without_log_file(self):
|
||||||
conf_dict = {'debug': True,
|
conf_dict = {'debug': True,
|
||||||
'verbose': True,
|
|
||||||
'log_dir': '/etc/tests',
|
'log_dir': '/etc/tests',
|
||||||
'log_file': None,
|
'log_file': None,
|
||||||
'use_syslog': False,
|
'use_syslog': False,
|
||||||
'syslog_log_facility': 'LOG_USER'}
|
'syslog_log_facility': 'LOG_USER'}
|
||||||
conf = dhcp.DictModel(conf_dict)
|
conf = dhcp.DictModel(conf_dict)
|
||||||
expected_args = ['--debug',
|
expected_args = ['--debug',
|
||||||
'--verbose',
|
|
||||||
'--log-file=log_file_name',
|
'--log-file=log_file_name',
|
||||||
'--log-dir=/etc/tests']
|
'--log-dir=/etc/tests']
|
||||||
args = config.get_log_args(conf, 'log_file_name')
|
args = config.get_log_args(conf, 'log_file_name')
|
||||||
@@ -569,7 +566,6 @@ class TestLogArgs(base.BaseTestCase):
|
|||||||
|
|
||||||
def test_log_args_with_log_dir_and_file(self):
|
def test_log_args_with_log_dir_and_file(self):
|
||||||
conf_dict = {'debug': True,
|
conf_dict = {'debug': True,
|
||||||
'verbose': False,
|
|
||||||
'log_dir': '/etc/tests',
|
'log_dir': '/etc/tests',
|
||||||
'log_file': 'tests/filelog',
|
'log_file': 'tests/filelog',
|
||||||
'use_syslog': False,
|
'use_syslog': False,
|
||||||
@@ -583,7 +579,6 @@ class TestLogArgs(base.BaseTestCase):
|
|||||||
|
|
||||||
def test_log_args_without_log_dir(self):
|
def test_log_args_without_log_dir(self):
|
||||||
conf_dict = {'debug': True,
|
conf_dict = {'debug': True,
|
||||||
'verbose': False,
|
|
||||||
'log_file': 'tests/filelog',
|
'log_file': 'tests/filelog',
|
||||||
'log_dir': None,
|
'log_dir': None,
|
||||||
'use_syslog': False,
|
'use_syslog': False,
|
||||||
@@ -597,14 +592,12 @@ class TestLogArgs(base.BaseTestCase):
|
|||||||
|
|
||||||
def test_log_args_with_filelog_and_syslog(self):
|
def test_log_args_with_filelog_and_syslog(self):
|
||||||
conf_dict = {'debug': True,
|
conf_dict = {'debug': True,
|
||||||
'verbose': True,
|
|
||||||
'log_file': 'tests/filelog',
|
'log_file': 'tests/filelog',
|
||||||
'log_dir': '/etc/tests',
|
'log_dir': '/etc/tests',
|
||||||
'use_syslog': True,
|
'use_syslog': True,
|
||||||
'syslog_log_facility': 'LOG_USER'}
|
'syslog_log_facility': 'LOG_USER'}
|
||||||
conf = dhcp.DictModel(conf_dict)
|
conf = dhcp.DictModel(conf_dict)
|
||||||
expected_args = ['--debug',
|
expected_args = ['--debug',
|
||||||
'--verbose',
|
|
||||||
'--log-file=log_file_name',
|
'--log-file=log_file_name',
|
||||||
'--log-dir=/etc/tests/tests']
|
'--log-dir=/etc/tests/tests']
|
||||||
args = config.get_log_args(conf, 'log_file_name')
|
args = config.get_log_args(conf, 'log_file_name')
|
||||||
@@ -852,7 +845,6 @@ class TestDhcpAgentEventHandler(base.BaseTestCase):
|
|||||||
def _test_enable_isolated_metadata_proxy(self, network):
|
def _test_enable_isolated_metadata_proxy(self, network):
|
||||||
cfg.CONF.set_override('enable_metadata_network', True)
|
cfg.CONF.set_override('enable_metadata_network', True)
|
||||||
cfg.CONF.set_override('debug', True)
|
cfg.CONF.set_override('debug', True)
|
||||||
cfg.CONF.set_override('verbose', False)
|
|
||||||
cfg.CONF.set_override('log_file', 'test.log')
|
cfg.CONF.set_override('log_file', 'test.log')
|
||||||
method_path = ('neutron.agent.metadata.driver.MetadataDriver'
|
method_path = ('neutron.agent.metadata.driver.MetadataDriver'
|
||||||
'.spawn_monitored_metadata_proxy')
|
'.spawn_monitored_metadata_proxy')
|
||||||
|
|||||||
@@ -115,7 +115,6 @@ class TestMetadataDriverProcess(base.BaseTestCase):
|
|||||||
'--metadata_proxy_user=%s' % expected_user,
|
'--metadata_proxy_user=%s' % expected_user,
|
||||||
'--metadata_proxy_group=%s' % expected_group,
|
'--metadata_proxy_group=%s' % expected_group,
|
||||||
'--debug',
|
'--debug',
|
||||||
'--verbose',
|
|
||||||
'--log-file=neutron-ns-metadata-proxy-%s.log' %
|
'--log-file=neutron-ns-metadata-proxy-%s.log' %
|
||||||
router_id]
|
router_id]
|
||||||
if not watch_log:
|
if not watch_log:
|
||||||
|
|||||||
Reference in New Issue
Block a user