def add_filters_for_logger(logger, filters):
    """
    Add provided exclusion filters to the provided logger instance.

    :param logger: Logger class instance.
    :type logger: :class:`logging.Filter`

    :param filter: List of Logger filter instances.
    :type filter: ``list`` of :class:`logging.Filter`
    """
    if not isinstance(logger, logging.Logger):
        return logger

    if not hasattr(logger, "addFilter"):
        return logger

    for logger_filter in filters:
        logger.addFilter(logger_filter)

    return logger

    Add provided exclusion filters to the provided logger instance.

    :param logger: Logger class instance.
    :type logger: :class:`logging.Filter`

    :param filter: List of Logger filter instances.
    :type filter: ``list`` of :class:`logging.Filter`
    
st2common/st2common/logging/misc.py