import logging


def create_log_handler(name, log_level=None, style_adaptor=None):
    """Create a logger.
    """
    log = logging.getLogger(name)

    if log_level:
        log.setLevel(log_level)

    if style_adaptor:
        log = style_adaptor(log)

    return log