This module complements the python logging module. It is designed to seamlessly integrate with other logging libraries. Behind the scenes, loggers adds buffering handlers to each new logger it creates, to allow for logging before the logging interface is configured. For simple logging scripts, try getSimpleLogger().
Setup logging from a configuration object. Configuration should meet Python’s logging.config configuration requirements. This method uses logging.config.dictConfig() to process configurations.
Parameters: | configuration – Any object which can be interpreted by pyshell.config.DottedConfiguration.make(). |
---|
The loggers will be configured. If any loggers to be configured have a BufferHandler, that buffer will be emptied into the newly configured handlers.
Return a logger for a specified name.
This differs from the built-in logging.getLogger() function as it ensures that returned loggers will have a BufferHandler attached if no other handlers are found. It can be otherwise used in place of logging.getLogger().
Retrieves a logger with a simple logging configuration setup, which writes colorful logging output to the console using the configuration provided by logging-stream-all.yml. Only the root logger is configured with the console handler, all others have only a level set.
Parameters: |
|
---|
Configurations are cumulative, so getSimpleLogger() can be called multiple times.
Debuffer a given logger.
Parameters: | name – The name of the logger to debuffer. |
---|
This method will atempt to dump all of the messages from a logger’s BufferHandler into its other handlers. Then it will remove the buffer from the logger.
Buffer named logger.
Parameters: | name – The name of the logger to debuffer. |
---|
This method will add a BufferHandler to the named logger, and will remove the other handlers.
A new default handler (similar to a NULL handler) which holds onto targets for later.
A special case of ManyTargetHandler for use with debuffer_logger().