This module provides a class to fork the output to a logger.
Prepare a logger from logging to make the loggerwriter to direct the output.
logger = logging.getLogger()
logger.setLevel(logging.INFO)
Capture and redirect output to logger and sys.stdout.
sys.stdout = loggerwriter.LoggerWriter(logger, sys.__stdout__)