import logging


def setup_logger(name):
    """Setup and return logger ``name`` with same settings as 'lymph' logger."""
    lymph_logger = logging.getLogger('lymph')
    logger = logging.getLogger(name)
    for hdlr in lymph_logger.handlers:
        logger.addHandler(hdlr)
    logger.setLevel(lymph_logger.level)
    # Since we are using DictConfig all logger are disabled by default first, so
    # we are enabling any logger here !
    logger.disabled = False
    return logger