import logging


def setup_logger(name: str = None) -> logging.Logger:
    """Setup logger with consistent formatting."""
    logger = logging.getLogger(name or __name__)
    if not logger.handlers:  # Avoid duplicate handlers
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
        handler.setFormatter(formatter)
        logger.addHandler(handler)
    return logger