import logging
from logging import Logger

def init_logger(name: str) -> Logger:
    """Initialize loggers for benchmarks module,
    and keep the configuration consistent with the vllm module"""

    logger = logging.getLogger(name)

    vllm_logger = logging.Logger.manager.loggerDict.get('vllm', None)
    if vllm_logger:
        logger.setLevel(vllm_logger.level)
        logger.propagate = vllm_logger.propagate
        logger.handlers = vllm_logger.handlers

    return logger

