Remove unused use-syslog-rfc-format option

Remove this option that appears ignored. For reference by similar name
only, this option is marked as deprecated and to be removed from oslo.log
in Mitaka. Refer to I9b77899fe437d359df2a15961866b194b564ca48.

Change-Id: I9a97b53d829a9ca6b92ee4b545f616a3bc5b25be
This commit is contained in:
Ronald Bradford 2016-02-02 20:38:02 +00:00
parent 22afa47ca7
commit 6d104a3b41
5 changed files with 1 additions and 24 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@ ChangeLog
*.pyc *.pyc
*.log *.log
.tox .tox
.eggs*
.coverage .coverage
oslo.rootwrap.egg-info/ oslo.rootwrap.egg-info/
build/ build/

View File

@ -102,11 +102,6 @@ use_syslog
Enable logging to syslog. Default value is False. Example: Enable logging to syslog. Default value is False. Example:
``use_syslog=True`` ``use_syslog=True``
use_syslog_rfc_format
Enable RFC5424 compliant format for syslog (add APP-NAME before MSG part).
Default value is False. Example:
``use_syslog_rfc_format=True``
syslog_log_facility syslog_log_facility
Which syslog facility to use for syslog logging. Valid values include Which syslog facility to use for syslog logging. Valid values include
``auth``, ``authpriv``, ``syslog``, ``user0``, ``user1``... ``auth``, ``authpriv``, ``syslog``, ``user0``, ``user1``...

View File

@ -16,11 +16,6 @@ exec_dirs=/sbin,/usr/sbin,/bin,/usr/bin
# Default value is False # Default value is False
use_syslog=False use_syslog=False
# Enable RFC5424 compliant format for syslog (add APP-NAME before MSG part)
# Default value is False - no format changes
# TODO(bogdando) remove or use True after existing syslog format deprecation in J
use_syslog_rfc_format=False
# Which syslog facility to use. # Which syslog facility to use.
# Valid values include auth, authpriv, syslog, user0, user1... # Valid values include auth, authpriv, syslog, user0, user1...
# Default value is 'syslog' # Default value is 'syslog'

View File

@ -421,7 +421,6 @@ class RootwrapTestCase(testtools.TestCase):
self.assertEqual(c.exec_dirs, []) self.assertEqual(c.exec_dirs, [])
self.assertFalse(config.use_syslog) self.assertFalse(config.use_syslog)
self.assertFalse(config.use_syslog_rfc_format)
self.assertEqual(config.syslog_log_facility, self.assertEqual(config.syslog_log_facility,
logging.handlers.SysLogHandler.LOG_SYSLOG) logging.handlers.SysLogHandler.LOG_SYSLOG)
self.assertEqual(config.syslog_log_level, logging.ERROR) self.assertEqual(config.syslog_log_level, logging.ERROR)
@ -437,12 +436,6 @@ class RootwrapTestCase(testtools.TestCase):
config = wrapper.RootwrapConfig(raw) config = wrapper.RootwrapConfig(raw)
self.assertTrue(config.use_syslog) self.assertTrue(config.use_syslog)
raw.set('DEFAULT', 'use_syslog_rfc_format', 'oui')
self.assertRaises(ValueError, wrapper.RootwrapConfig, raw)
raw.set('DEFAULT', 'use_syslog_rfc_format', 'true')
config = wrapper.RootwrapConfig(raw)
self.assertTrue(config.use_syslog_rfc_format)
raw.set('DEFAULT', 'syslog_log_facility', 'moo') raw.set('DEFAULT', 'syslog_log_facility', 'moo')
self.assertRaises(ValueError, wrapper.RootwrapConfig, raw) self.assertRaises(ValueError, wrapper.RootwrapConfig, raw)
raw.set('DEFAULT', 'syslog_log_facility', 'local0') raw.set('DEFAULT', 'syslog_log_facility', 'local0')

View File

@ -87,13 +87,6 @@ class RootwrapConfig(object):
else: else:
self.use_syslog = False self.use_syslog = False
# use_syslog_rfc_format
if config.has_option("DEFAULT", "use_syslog_rfc_format"):
self.use_syslog_rfc_format = config.getboolean(
"DEFAULT", "use_syslog_rfc_format")
else:
self.use_syslog_rfc_format = False
def setup_syslog(execname, facility, level): def setup_syslog(execname, facility, level):
rootwrap_logger = logging.getLogger() rootwrap_logger = logging.getLogger()