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
Bases: logging.StreamHandler
Bases: openstack_dashboard.openstack.common.log.BaseLoggerAdapter
Call this method when a deprecated feature is used.
If the system is configured for fatal deprecations then the message is logged at the ‘critical’ level and DeprecatedConfig will be raised.
Otherwise, the message will be logged (once) at the ‘warn’ level.
Raises : | DeprecatedConfig if the system is configured for fatal deprecations. |
---|
Delegate a warning call to the underlying logger, after adding contextual information from this adapter instance.
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
Uses contextstring if request_id is set, otherwise default.
Format exception output with CONF.logging_exception_prefix.
Bases: exceptions.Exception
Bases: logging.Formatter
Bases: openstack_dashboard.openstack.common.log.BaseLoggerAdapter
Bases: exceptions.Exception
Bases: logging.handlers.SysLogHandler
Bases: object
A thin wrapper that responds to write and logs.
Returns lazy logger.
Creates a pass-through logger that does not create the real logger until it is really needed and delegates all calls to the real logger once it is created.
Replace password with ‘secret’ in message.
Parameters: |
|
---|---|
Returns: | The unicode value of message with the password fields masked. |
For example:
>>> mask_password("'adminPass' : 'aaaaa'")
"'adminPass' : '***'"
>>> mask_password("'admin_pass' : 'aaaaa'")
"'admin_pass' : '***'"
>>> mask_password('"password" : "aaaaa"')
'"password" : "***"'
>>> mask_password("'original_password' : 'aaaaa'")
"'original_password' : '***'"
>>> mask_password("u'original_password' : u'aaaaa'")
"u'original_password' : u'***'"
Setup logging.