public class RegexFilteringInterceptor extends Object implements Interceptor
regex: Regular expression for matching excluded events. (default is ".*")
excludeEvents: If true, a regex match determines events to exclude, otherwise a regex determines events to include (default is false)
Sample config:
agent.sources.r1.type = SEQ
agent.sources.r1.interceptors = i1
agent.sources.r1.interceptors.i1.type = REGEX
agent.sources.r1.interceptors.i1.regex = (WARNING)|(ERROR)|(FATAL)
agent.sources.r1.channels = c1
Modifier and Type | Class and Description |
---|---|
static class |
RegexFilteringInterceptor.Builder
Builder which builds new instance of the StaticInterceptor.
|
static class |
RegexFilteringInterceptor.Constants |
Modifier and Type | Method and Description |
---|---|
void |
close()
Perform any closing / shutdown needed by the Interceptor.
|
void |
initialize()
Any initialization / startup needed by the Interceptor.
|
Event |
intercept(Event event)
Interception of a single
Event . |
List<Event> |
intercept(List<Event> events)
Returns the set of events which pass filters, according to
intercept(Event) . |
public void initialize()
Interceptor
initialize
in interface Interceptor
public Event intercept(Event event)
Interceptor
Event
.intercept
in interface Interceptor
event
- Event to be interceptednull
if the Event
is to be dropped (i.e. filtered out).public List<Event> intercept(List<Event> events)
intercept(Event)
.intercept
in interface Interceptor
events
- public void close()
Interceptor
close
in interface Interceptor
Copyright © 2009-2014 Apache Software Foundation. All Rights Reserved.