flowbber.logging
¶Multiprocess logging management module.
setup_logging()
:
Setup logging for this process.print()
:
Enqueue a print to the given fd.get_logger()
:
Return a multiprocess safe logger.flowbber.logging.
setup_logging
(verbosity=0)¶Setup logging for this process.
The first time it is called it will create a subprocess to manage the logging and printing, setup the subprocess for stream logging to stdout and setup the main process to queue logging.
In consequence, any subprocess of the main process will inherit the queue logging and become multiprocess logging safe.
This method can be called from subprocesses, but if at least one logging has been performed it will fail as the handler will already exists.
LoggingManager.LEVELS
. The greater the number the more information
is provided, with 0 as initial level.flowbber.logging.
print
(obj, fd='stdout')¶Enqueue a print to the given fd.
flowbber.logging.
get_logger
(name)¶Return a multiprocess safe logger.
logging.Logger
.