'Determine if a record is loggable by consulting all the filters.
The default is to allow the record to be logged; any filter can veto
this and the record is then dropped. Returns a zero value if a record
is to be dropped, else non-zero.
.. versionchanged: 3.2
Allow filters to be just callables.'

def filter(self, record):

    rv = True
    for f in self.filters:
        if hasattr(f, 'filter'):
            result = f.filter(record)
        else:
            result = f(record)
        if (not result):
            rv = False
            break
    return rv
