logging.LoggerAdapter¶
-
class
logging.LoggerAdapter(logger, extra)[source]¶ An adapter for loggers which makes it easier to specify contextual information in logging output.
Methods¶
__format__ |
default object formatter |
__init__(logger, extra) |
Initialize the adapter with a logger and a dict-like object which provides contextual information. |
__new__((S, ...) |
|
__reduce__ |
helper for pickle |
__reduce_ex__ |
helper for pickle |
__sizeof__(() -> int) |
size of object in memory, in bytes |
__subclasshook__ |
Abstract classes can override this to customize issubclass(). |
critical(msg, *args, **kwargs) |
Delegate a critical call to the underlying logger, after adding contextual information from this adapter instance. |
debug(msg, *args, **kwargs) |
Delegate a debug call to the underlying logger, after adding contextual information from this adapter instance. |
error(msg, *args, **kwargs) |
Delegate an error call to the underlying logger, after adding contextual information from this adapter instance. |
exception(msg, *args, **kwargs) |
Delegate an exception call to the underlying logger, after adding contextual information from this adapter instance. |
info(msg, *args, **kwargs) |
Delegate an info call to the underlying logger, after adding contextual information from this adapter instance. |
isEnabledFor(level) |
See if the underlying logger is enabled for the specified level. |
log(level, msg, *args, **kwargs) |
Delegate a log call to the underlying logger, after adding contextual information from this adapter instance. |
process(msg, kwargs) |
Process the logging message and keyword arguments passed in to a logging call to insert contextual information. |
warning(msg, *args, **kwargs) |
Delegate a warning call to the underlying logger, after adding contextual information from this adapter instance. |