Setup the root logger. Return the logger instance for possible further setting and use.

    To be used from CLI scripts only.

def setup_logger():  # type: () -> logging.Logger
    """Setup the root logger. Return the logger instance for possible further setting and use.

    To be used from CLI scripts only.
    """
    formatter = logging.Formatter(
        fmt='%(levelname)s - %(module)s - %(message)s')

    handler = logging.StreamHandler()
    handler.setFormatter(formatter)

    logger = logging.getLogger()
    logger.setLevel(logging.DEBUG)
    logger.addHandler(handler)
    return logger