def hasHandlers(logger):
    """
    See if a logger has any handlers.
    """
    rv = False
    while logger:
        if logger.handlers:
            rv = True
            break
        elif not logger.propagate:
            break
        else:
            logger = logger.parent
    return rv