Helper function to get a logger

def get_logger(name):
    """Helper function to get a logger"""
    if name in loggers:
        return loggers[name]
    logger = logging.getLogger(name)
    logger.propagate = False
    pre1, suf1 = hash_coloured_escapes(name) if supports_color() else ('', '')
    pre2, suf2 = hash_coloured_escapes(name + 'salt')  \
                 if supports_color() else ('', '')
    formatter = logging.Formatter(
        '%(levelname)s {}+{}+{} '
        '%(name)s: %(message)s'.format(pre1, pre2, suf1)
    )
    ch = logging.StreamHandler()
    ch.setFormatter(formatter)
    logger.addHandler(ch)
    loggers[name] = logger

    logger.once_dict = {}

    return logger