OpenStack logging handler.
This module adds to logging functionality by adding the option to specify a context object when calling the various log methods. If the context object is not specified, default formatting is used. Additionally, an instance uuid may be passed as part of the log message, which is intended to make it easier for admins to find messages related to a specific instance.
It also allows setting of formatting information through conf.
Bases: logging.LoggerAdapter
Delegate a warning call to the underlying logger.
Bases: oslo_log.log.BaseLoggerAdapter
Logger adapter to add keyword arguments to log record’s extra data
Keywords passed to the log call are added to the “extra” dictionary passed to the underlying logger so they are emitted with the log message and available to the format string.
Special keywords:
An existing dictionary of extra values to be passed to the logger. If present, the dictionary is copied and extended.
name
key or type
and id
keys.
Process the logging message and keyword arguments passed in to a logging call to insert contextual information. You can either manipulate the message itself, the keyword args or both. Return the message and kwargs modified (or not) to suit your needs.
Normally, you’ll only need to override this one method in a LoggerAdapter subclass for your specific needs.
Bases: Exception
Build a logger with the given name.
name (string) – The name for the logger. This is usually the module
name, __name__
.
project (string) – The name of the project, to be injected into log
messages. For example, 'nova'
.
version (string) – The version of the project, to be injected into log
messages. For example, '2014.2'
.
Return the Oslo Logging default log levels.
Returns a copy of the list so an application can change the value and not affect the default value used in the log_opts configuration setup.
Return a copy of the oslo loggers dictionary.
Determine if debug logging mode is enabled.
Register the command line and configuration options used by oslo.log.
Set default values for the configuration options used by oslo.log.
Setup logging for the current application.
Provide an API for tempest to set the logging filename.
Warning
Only Tempest should use this function.
We don’t want applications to set a default log file, so we don’t want this in set_defaults(). Because tempest doesn’t use a configuration file we don’t have another convenient way to safely set the log file default.
See also
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.