import logging


def _loggerBySpec(logger):
    """Logger maybe a logger, logger name, or None for default logger, returns the
    logger."""
    if not isinstance(logger, logging.Logger):
        logger = logging.getLogger(logger)
    return logger