Superclass for classes that have a $filter() method such as
Appenders and Loggers. See EventFilter for details.
NOTE: This is an abstract class. Abstract classes cannot be instantiated directly, but are exported for package developers that want to extend lgr - for example by creating their own Appenders or Layouts. Please refer to the see also section for actual implementations of this class.
See also
Other abstract classes:
Appender,
AppenderMemory,
AppenderTable
Methods
Method filter()
Determine whether the LogEvent x should be passed on to
Appenders (TRUE) or not (FALSE). See also the active binding
filters.
Arguments
eventa LogEvent
Method add_filter()
Attach a filter
Arguments
filtera function with the single argument
eventthat returnsTRUEorFALSE;an EventFilter R6::R6 object; or
any R object with a
$filter()method.
If a Filter returns a non-
FALSEvalue, will be interpreted asTRUE(= no filtering takes place) and a warning will be thrown.namecharacterscalar orNULL. An optional name which makes it easier to access (or remove) the filter
Method set_filters()
Set or replace (all) Filters of parent object. See EventFilter for how Filters work.
Arguments
filtersa
list(named or unnamed) of EventFilters or predicate functions. Seeis_filter().