logging#
Configure logging.
A call to the function config_logger in a launching script
is all that is needed to set up the logging format.
Usually the ‘level’ argument is the only argument one needs to customize:
config_logger(level='info')
Do not call this in library modules. Library modules should have:
logger = logging.getLogger(__name__)
and then just use logger to write logs without concern about formatting,
destination of the log message, etc.
- cloudly.util.logging.set_level(level: str | int = 20) int[source]#
In one application, call set_level on the top level. Usually you should do this only once, and do not set level on any handler.
Return the original level that was in effect before this function was called. By default, the original level is logging.INFO or logging.WARNING.
- Parameters:
- level
Either the integers logging.DEBUG, logging.INFO, etc., or strings “debug”, “info”, etc.