oslo_log.formatters¶
-
class
oslo_log.formatters.
ContextFormatter
(*args, **kwargs)¶ Bases:
logging.Formatter
A context.RequestContext aware formatter configured through flags.
The flags used to set format strings are: logging_context_format_string and logging_default_format_string. You can also specify logging_debug_format_suffix to append extra formatting if the log level is debug.
For information about what variables are available for the formatter see: http://docs.python.org/library/logging.html#formatter
If available, uses the context value stored in TLS - local.store.context
-
format
(record)¶ Uses contextstring if request_id is set, otherwise default.
-
formatException
(exc_info, record=None)¶ Format exception output with CONF.logging_exception_prefix.
-