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:
Ihar Hrachyshka 2016-05-26 13:16:30 +02:00
parent bbebfcccbe
commit 22da3db98b
6 changed files with 1 additions and 21 deletions

View File

@ -98,8 +98,6 @@ def get_log_args(conf, log_file_name, **kwargs):
cmd_args = []
if conf.debug:
cmd_args.append('--debug')
if conf.verbose:
cmd_args.append('--verbose')
if (conf.log_dir or conf.log_file):
cmd_args.append('--log-file=%s' % log_file_name)
log_dir = None

View File

@ -127,7 +127,6 @@ def configure(conf):
config.init(sys.argv[1:])
conf.set_override('log_dir', cfg.CONF.conf_dir)
conf.set_override('debug', True)
conf.set_override('verbose', True)
config.setup_logging()

View File

@ -71,13 +71,7 @@ class NeutronApiService(WsgiService):
@classmethod
def create(cls, app_name='neutron'):
# 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...
# Setup logging early
config.setup_logging()
service = cls(app_name)
return service

View File

@ -68,7 +68,6 @@ class NeutronConfigFixture(ConfigFixture):
'core_plugin': 'neutron.plugins.ml2.plugin.Ml2Plugin',
'service_plugins': ','.join(service_plugins),
'auth_strategy': 'noauth',
'verbose': 'True',
'debug': 'True',
},
'database': {
@ -259,7 +258,6 @@ class L3ConfigFixture(ConfigFixture):
self._prepare_config_with_linuxbridge_agent()
self.config['DEFAULT'].update({
'debug': 'True',
'verbose': 'True',
'test_namespace_suffix': self._generate_namespace_suffix(),
})

View File

@ -540,7 +540,6 @@ class TestLogArgs(base.BaseTestCase):
def test_log_args_without_log_dir_and_file(self):
conf_dict = {'debug': True,
'verbose': False,
'log_dir': None,
'log_file': None,
'use_syslog': True,
@ -554,14 +553,12 @@ class TestLogArgs(base.BaseTestCase):
def test_log_args_without_log_file(self):
conf_dict = {'debug': True,
'verbose': True,
'log_dir': '/etc/tests',
'log_file': None,
'use_syslog': False,
'syslog_log_facility': 'LOG_USER'}
conf = dhcp.DictModel(conf_dict)
expected_args = ['--debug',
'--verbose',
'--log-file=log_file_name',
'--log-dir=/etc/tests']
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):
conf_dict = {'debug': True,
'verbose': False,
'log_dir': '/etc/tests',
'log_file': 'tests/filelog',
'use_syslog': False,
@ -583,7 +579,6 @@ class TestLogArgs(base.BaseTestCase):
def test_log_args_without_log_dir(self):
conf_dict = {'debug': True,
'verbose': False,
'log_file': 'tests/filelog',
'log_dir': None,
'use_syslog': False,
@ -597,14 +592,12 @@ class TestLogArgs(base.BaseTestCase):
def test_log_args_with_filelog_and_syslog(self):
conf_dict = {'debug': True,
'verbose': True,
'log_file': 'tests/filelog',
'log_dir': '/etc/tests',
'use_syslog': True,
'syslog_log_facility': 'LOG_USER'}
conf = dhcp.DictModel(conf_dict)
expected_args = ['--debug',
'--verbose',
'--log-file=log_file_name',
'--log-dir=/etc/tests/tests']
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):
cfg.CONF.set_override('enable_metadata_network', True)
cfg.CONF.set_override('debug', True)
cfg.CONF.set_override('verbose', False)
cfg.CONF.set_override('log_file', 'test.log')
method_path = ('neutron.agent.metadata.driver.MetadataDriver'
'.spawn_monitored_metadata_proxy')

View File

@ -115,7 +115,6 @@ class TestMetadataDriverProcess(base.BaseTestCase):
'--metadata_proxy_user=%s' % expected_user,
'--metadata_proxy_group=%s' % expected_group,
'--debug',
'--verbose',
'--log-file=neutron-ns-metadata-proxy-%s.log' %
router_id]
if not watch_log: