# ``twisted`.`logger`.`_filter``

module documentation
(source)

Filtering log observer.

Function | `shouldLogEvent` | Determine whether an event should be logged, based on the result of `predicates`.

def shouldLogEvent(predicates, event): (source)

Determine whether an event should be logged, based on the result of `predicates`.

By default, the result is `True`; so if there are no predicates, everything will be logged.

If any predicate returns `yes`, then we will immediately return `True`.

If any predicate returns `no`, then we will immediately return `False`.

As predicates return `maybe`, we keep calling the next predicate until we run out, at which point we return `True`.

Parameters
predicates:`Iterable[ILogFilterPredicate]` | The predicates to use.
event:`LogEvent` | An event
Returns
`bool` | True if the message should be forwarded on, `False` if not.