| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/Filter.R |
| 3 |
\name{is_filter} |
| 4 |
\alias{is_filter} |
| 5 |
\title{Check if an R Object is a Filter} |
| 6 |
\usage{ |
| 7 |
is_filter(x) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{x}{any \R Object} |
| 11 |
} |
| 12 |
\value{ |
| 13 |
\code{TRUE} or \code{FALSE} |
| 14 |
} |
| 15 |
\description{ |
| 16 |
Returns \code{TRUE} for any \R object that can be used as a Filter |
| 17 |
for \link{Loggers} or, \link{Appenders}: |
| 18 |
\itemize{ |
| 19 |
\item a \code{function} with the single argument \code{event}; |
| 20 |
\item an \link{EventFilter} \link[R6:R6Class]{R6::R6} object; or |
| 21 |
\item any object with a \verb{$filter(event)} method. |
| 22 |
} |
| 23 |
|
| 24 |
\strong{Note:} A Filter \strong{must} return a scalar \code{TRUE} or \code{FALSE}, but this |
| 25 |
property cannot be checked by \code{\link[=is_filter]{is_filter()}}. |
| 26 |
} |
| 27 |
\seealso{ |
| 28 |
\link{EventFilter}, \link{Filterable} |
| 29 |
} |