public final class ErrorFilter extends EventFilter implements scala.Product, scala.Serializable
throwable
applies an upper bound on the type of exception contained in the Error eventsource
, if given, applies a filter on the event’s originmessage
applies a filter on the event’s message (either
with String.startsWith or Regex.findFirstIn().isDefined); if the message
itself does not match, the match is retried with the contained Exception’s
message; if both are null
, the filter always matches if at
the same time the Exception’s stack trace is empty (this catches
JVM-omitted “fast-throw” exceptions)Left("")
.Constructor and Description |
---|
ErrorFilter(java.lang.Class<?> throwable)
Java API: filter only on the given type of exception
|
ErrorFilter(java.lang.Class<?> throwable,
scala.Option<java.lang.String> source,
scala.util.Either<java.lang.String,scala.util.matching.Regex> message,
boolean complete,
int occurrences) |
ErrorFilter(java.lang.Class<?> throwable,
java.lang.String source,
java.lang.String message,
boolean pattern,
boolean complete,
int occurrences)
Java API: create an ErrorFilter
|
Modifier and Type | Method and Description |
---|---|
boolean |
complete() |
boolean |
matches(akka.event.Logging.LogEvent event)
This method decides whether to filter the event (
true ) or not
(false ). |
scala.util.Either<java.lang.String,scala.util.matching.Regex> |
message() |
scala.Option<java.lang.String> |
source() |
java.lang.Class<?> |
throwable() |
apply, assertDone, awaitDone, custom, debug, doMatch, error, info, intercept, warning
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ErrorFilter(java.lang.Class<?> throwable, scala.Option<java.lang.String> source, scala.util.Either<java.lang.String,scala.util.matching.Regex> message, boolean complete, int occurrences)
public ErrorFilter(java.lang.Class<?> throwable, java.lang.String source, java.lang.String message, boolean pattern, boolean complete, int occurrences)
source
- apply this filter only to events from the given source; do not filter on source if this is given as null
message
- apply this filter only to events whose message matches; do not filter on message if this is given as null
pattern
- if false
, the message string must start with the given
string, otherwise the message
argument is treated as
regular expression which is matched against the message (may match only
a substring to filter)complete
- whether the event’s message must match the given message string or pattern completelythrowable
- (undocumented)occurrences
- (undocumented)public ErrorFilter(java.lang.Class<?> throwable)
throwable
- (undocumented)public java.lang.Class<?> throwable()
public scala.Option<java.lang.String> source()
source
in class EventFilter
public scala.util.Either<java.lang.String,scala.util.matching.Regex> message()
message
in class EventFilter
public boolean complete()
complete
in class EventFilter
public boolean matches(akka.event.Logging.LogEvent event)
EventFilter
true
) or not
(false
).matches
in class EventFilter
event
- (undocumented)