From 7c5f8362b26313217b6c248e77be3dc8e2ef74a5 Mon Sep 17 00:00:00 2001 From: Pavlo Shchelokovskyy Date: Mon, 18 Feb 2019 16:57:51 +0000 Subject: Clarify some config options current help message to log-config-append is a bit misleading: if the extra logging config is using oslo_log's ContextFormatter as formatter for some handler, the logging_context_format_string option and the like do in fact still apply. Instead, give the `log-date-format` as example option that does apply when log-config-append is enabled and clarify that some options are used with ContextFormatter only. Change-Id: I917cdf8799ac0fb5b49873d5c7bccd957a42f347 --- oslo_log/_options.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/oslo_log/_options.py b/oslo_log/_options.py index 64b3737..e1c2dd8 100644 --- a/oslo_log/_options.py +++ b/oslo_log/_options.py @@ -53,7 +53,7 @@ logging_cli_opts = [ 'when logging configuration files are used then all ' 'logging configuration is set in the configuration file ' 'and other logging configuration options are ignored ' - '(for example, logging_context_format_string).'), + '(for example, log-date-format).'), cfg.StrOpt('log-date-format', default=_DEFAULT_LOG_DATE_FORMAT, metavar='DATE_FORMAT', @@ -148,25 +148,30 @@ log_opts = [ default='%(asctime)s.%(msecs)03d %(process)d %(levelname)s ' '%(name)s [%(request_id)s %(user_identity)s] ' '%(instance)s%(message)s', - help='Format string to use for log messages with context.'), + help='Format string to use for log messages with context. ' + 'Used by oslo_log.formatters.ContextFormatter'), cfg.StrOpt('logging_default_format_string', default='%(asctime)s.%(msecs)03d %(process)d %(levelname)s ' '%(name)s [-] %(instance)s%(message)s', help='Format string to use for log messages when context is ' - 'undefined.'), + 'undefined. ' + 'Used by oslo_log.formatters.ContextFormatter'), cfg.StrOpt('logging_debug_format_suffix', default='%(funcName)s %(pathname)s:%(lineno)d', help='Additional data to append to log message when logging ' - 'level for the message is DEBUG.'), + 'level for the message is DEBUG. ' + 'Used by oslo_log.formatters.ContextFormatter'), cfg.StrOpt('logging_exception_prefix', default='%(asctime)s.%(msecs)03d %(process)d ERROR %(name)s ' '%(instance)s', - help='Prefix each line of exception output with this format.'), + help='Prefix each line of exception output with this format. ' + 'Used by oslo_log.formatters.ContextFormatter'), cfg.StrOpt('logging_user_identity_format', default='%(user)s %(tenant)s ' '%(domain)s %(user_domain)s %(project_domain)s', help='Defines the format string for %(user_identity)s that ' - 'is used in logging_context_format_string.'), + 'is used in logging_context_format_string. ' + 'Used by oslo_log.formatters.ContextFormatter'), cfg.ListOpt('default_log_levels', default=DEFAULT_LOG_LEVELS, help='List of package logging levels in logger=LEVEL pairs. ' -- cgit v1.2.1