Class EventFilterFactory
TBD
public class EventFilterFactory
- Inheritance
-
EventFilterFactory
- Inherited Members
Constructors
EventFilterFactory(TestKitBase)
TBD
public EventFilterFactory(TestKitBase testkit)
Parameters
testkit
TestKitBaseTBD
EventFilterFactory(TestKitBase, ActorSystem)
TBD
public EventFilterFactory(TestKitBase testkit, ActorSystem system)
Parameters
testkit
TestKitBaseTBD
system
ActorSystemTBD
EventFilterFactory(TestKitBase, ActorSystem, IReadOnlyList<EventFilterBase>)
TBD
public EventFilterFactory(TestKitBase testkit, ActorSystem actorSystem, IReadOnlyList<EventFilterBase> filters)
Parameters
testkit
TestKitBaseTBD
actorSystem
ActorSystemTBD
filters
IReadOnlyList<EventFilterBase>TBD
Methods
CreateApplier(EventFilterBase, ActorSystem)
TBD
protected IEventFilterApplier CreateApplier(EventFilterBase filter, ActorSystem system)
Parameters
filter
EventFilterBaseTBD
system
ActorSystemTBD
Returns
CreateMessageMatcher(string, string, string)
TBD
protected static IStringMatcher CreateMessageMatcher(string message, string start, string contains)
Parameters
Returns
- IStringMatcher
TBD
Custom(Predicate<LogEvent>)
Create a custom event filter. The filter will affect those events for
which the predicate
function returns true
.
public IEventFilterApplier Custom(Predicate<LogEvent> predicate)
Parameters
predicate
Predicate<LogEvent>This function must return
true
for events that should be filtered.
Returns
Custom<TLogEvent>(Predicate<TLogEvent>)
Create a custom event filter. The filter will affect those events for
which the predicate
function returns true
.
public IEventFilterApplier Custom<TLogEvent>(Predicate<TLogEvent> predicate) where TLogEvent : LogEvent
Parameters
predicate
Predicate<TLogEvent>This function must return
true
for events that should be filtered.
Returns
Type Parameters
TLogEvent
TBD
DeadLetter()
Creates a filter that catches dead letters
public IEventFilterApplier DeadLetter()
Returns
DeadLetter(Type, Func<object, bool>, string)
Creates a filter that catches dead letters of the specified type and matches the predicate, and optionally from the specified source.
public IEventFilterApplier DeadLetter(Type type, Func<object, bool> isMatch, string source = null)
Parameters
Returns
DeadLetter(Type, string)
Creates a filter that catches dead letters of the specified type and, optionally from the specified source.
public IEventFilterApplier DeadLetter(Type type, string source = null)
Parameters
Returns
DeadLetter<TMessage>(Func<TMessage, bool>, string)
Creates a filter that catches dead letters of the specified type and matches the predicate, and optionally from the specified source.
public IEventFilterApplier DeadLetter<TMessage>(Func<TMessage, bool> isMatch, string source = null)
Parameters
Returns
Type Parameters
TMessage
TBD
DeadLetter<TMessage>(string)
Creates a filter that catches dead letters of the specified type and, optionally from the specified source.
public IEventFilterApplier DeadLetter<TMessage>(string source = null)
Parameters
source
stringTBD
Returns
Type Parameters
TMessage
TBD
Debug(string, string, string, string)
Create a filter for Akka.Event.Debug events.
message
takes priority over start
.
If message
!=null
the event must match it to be filtered.
If start
!=null
and message
has not been specified,
the event must start with the given string to be filtered.
If contains
!=null
and both message
and
start
have not been specified,
the event must contain the given string to be filtered.
source
being
null
does NOT work (passing null
disables the source filter).
public IEventFilterApplier Debug(string message = null, string start = null, string contains = null, string source = null)
Parameters
message
stringOptional. If specified the event must match it exactly to be filtered.
start
stringOptional. If specified (and
message
is not specified), the event must start with the string to be filtered.contains
stringOptional. If specified (and neither
message
norstart
are specified), the event must contain the string to be filtered.source
stringOptional. The event source.
Returns
- IEventFilterApplier
The new filter
Debug(Regex, string)
Create a filter for Akka.Event.Debug events. Events must match the specified pattern to be filtered.
source
being
null
does NOT work (passing null
disables the source filter).
public IEventFilterApplier Debug(Regex pattern, string source = null)
Parameters
pattern
RegexThe event must match the pattern to be filtered.
source
stringOptional. The event source.
Returns
- IEventFilterApplier
The new filter
Error(string, string, string, string)
Create a filter for Akka.Event.Error events.
message
takes priority over start
.
If message
!=null
the event must match it to be filtered.
If start
!=null
and message
has not been specified,
the event must start with the given string to be filtered.
If contains
!=null
and both message
and
start
have not been specified,
the event must contain the given string to be filtered.
source
being
null
does NOT work (passing null
disables the source filter).
public IEventFilterApplier Error(string message = null, string start = null, string contains = null, string source = null)
Parameters
message
stringOptional. If specified the event must match it exactly to be filtered.
start
stringOptional. If specified (and
message
is not specified), the event must start with the string to be filtered.contains
stringOptional. If specified (and neither
message
norstart
are specified), the event must contain the string to be filtered.source
stringOptional. The event source.
Returns
- IEventFilterApplier
The new filter
Error(Regex, string)
Create a filter for Akka.Event.Error events. Events must match the specified pattern to be filtered.
source
being
null
does NOT work (passing null
disables the source filter).
public IEventFilterApplier Error(Regex pattern, string source = null)
Parameters
pattern
RegexThe event must match the pattern to be filtered.
source
stringOptional. The event source.
Returns
- IEventFilterApplier
The new filter
Exception(Type, string, string, string, string, bool)
Create a filter for Akka.Event.Error events.
message
takes priority over start
.
If message
!=null
the event must match it to be filtered.
If start
!=null
and message
has not been specified,
the event must start with the given string to be filtered.
source
being
null
does NOT work (passing null
disables the source filter).
public IEventFilterApplier Exception(Type exceptionType, string message = null, string start = null, string contains = null, string source = null, bool checkInnerExceptions = false)
Parameters
exceptionType
TypeThe type of the exception. It must be a Exception.
message
stringOptional. If specified the event must match it exactly to be filtered.
start
stringOptional. If specified (and
message
is not specified, the event must start with the string to be filtered.contains
stringOptional. If specified (and neither
message
norstart
are specified), the event must contain the string to be filtered.source
stringOptional. The event source.
checkInnerExceptions
boolOptional. When set to
true
not only the top level exception is matched, but inner exceptions are also checked until one matches. Default:false
Returns
- IEventFilterApplier
The new filter
Exception(Type, Regex, string, bool)
Create a filter for Akka.Event.Error events. Events must match the specified pattern to be filtered.
source
being
null
does NOT work (passing null
disables the source filter).
public IEventFilterApplier Exception(Type exceptionType, Regex pattern, string source = null, bool checkInnerExceptions = false)
Parameters
exceptionType
TypeThe type of the exception. It must be a Exception.
pattern
RegexThe event must match the pattern to be filtered.
source
stringOptional. The event source.
checkInnerExceptions
boolOptional. When set to
true
not only the top level exception is matched, but inner exceptions are also checked until one matches. Default:false
Returns
- IEventFilterApplier
The new filter
Exception<TException>(string, string, string, string)
Create a filter for Akka.Event.Error events.
message
takes priority over start
.
If message
!=null
the event must match it to be filtered.
If start
!=null
and message
has not been specified,
the event must start with the given string to be filtered.
source
being
null
does NOT work (passing null
disables the source filter).
public IEventFilterApplier Exception<TException>(string message = null, string start = null, string contains = null, string source = null) where TException : Exception
Parameters
message
stringOptional. If specified the event must match it exactly to be filtered.
start
stringOptional. If specified (and
message
is not specified, the event must start with the string to be filtered.contains
stringOptional. If specified (and neither
message
norstart
are specified), the event must contain the string to be filtered.source
stringOptional. The event source.
Returns
- IEventFilterApplier
The new filter
Type Parameters
TException
The type of the exception.
Exception<TException>(Regex, string)
Create a filter for Akka.Event.Error events. Events must match the specified pattern to be filtered.
source
being
null
does NOT work (passing null
disables the source filter).
public IEventFilterApplier Exception<TException>(Regex pattern, string source = null) where TException : Exception
Parameters
pattern
RegexThe event must match the pattern to be filtered.
source
stringOptional. The event source.
Returns
- IEventFilterApplier
The new filter
Type Parameters
TException
The type of the exception.
ForLogLevel(LogLevel, string, string, string, string)
Creates an event filter given the specified logLevel
.
This is the same as calling Debug(string, string, string, string), Info(string, string, string, string)
Warning(string, string, string, string) or Error(string, string, string, string)
directly.
public IEventFilterApplier ForLogLevel(LogLevel logLevel, string message = null, string start = null, string contains = null, string source = null)
Parameters
logLevel
LogLevelThe log level used to match events being filtered.
message
stringOptional. If specified the event must match it exactly to be filtered.
start
stringOptional. If specified (and
message
is not specified), the event must start with the string to be filtered.contains
stringOptional. If specified (and neither
message
norstart
are specified), the event must contain the string to be filtered.source
stringOptional. The event source.
Returns
- IEventFilterApplier
An event filter that matches on the given
logLevel
.
Exceptions
- ArgumentOutOfRangeException
This exception is thrown when the given
logLevel
is unknown.
ForLogLevel(LogLevel, Regex, string)
Creates a filter given the specified logLevel
.
This is the same as calling Debug(Regex, string), Info(Regex, string)
Warning(Regex, string) or Error(Regex, string)
directly.
public IEventFilterApplier ForLogLevel(LogLevel logLevel, Regex pattern, string source = null)
Parameters
logLevel
LogLevelThe log level used to match events being filtered.
pattern
RegexThe event must match the pattern to be filtered.
source
stringOptional. The event source.
Returns
- IEventFilterApplier
An event filter that matches the given
logLevel
with the suppliedpattern
.
Exceptions
- ArgumentOutOfRangeException
This exception is thrown when the given
logLevel
is unknown.
Info(string, string, string, string)
Create a filter for Akka.Event.Info events.
message
takes priority over start
.
If message
!=null
the event must match it to be filtered.
If start
!=null
and message
has not been specified,
the event must start with the given string to be filtered.
If contains
!=null
and both message
and
start
have not been specified,
the event must contain the given string to be filtered.
source
being
null
does NOT work (passing null
disables the source filter).
public IEventFilterApplier Info(string message = null, string start = null, string contains = null, string source = null)
Parameters
message
stringOptional. If specified the event must match it exactly to be filtered.
start
stringOptional. If specified (and
message
is not specified), the event must start with the string to be filtered.contains
stringOptional. If specified (and neither
message
norstart
are specified), the event must contain the string to be filtered.source
stringOptional. The event source.
Returns
- IEventFilterApplier
The new filter
Info(Regex, string)
Create a filter for Akka.Event.Info events. Events must match the specified pattern to be filtered.
source
being
null
does NOT work (passing null
disables the source filter).
public IEventFilterApplier Info(Regex pattern, string source = null)
Parameters
pattern
RegexThe event must match the pattern to be filtered.
source
stringOptional. The event source.
Returns
- IEventFilterApplier
The new filter
Warning(string, string, string, string)
Create a filter for Akka.Event.Warning events.
message
takes priority over start
.
If message
!=null
the event must match it to be filtered.
If start
!=null
and message
has not been specified,
the event must start with the given string to be filtered.
If contains
!=null
and both message
and
start
have not been specified,
the event must contain the given string to be filtered.
source
being
null
does NOT work (passing null
disables the source filter).
public IEventFilterApplier Warning(string message = null, string start = null, string contains = null, string source = null)
Parameters
message
stringOptional. If specified the event must match it exactly to be filtered.
start
stringOptional. If specified (and
message
is not specified), the event must start with the string to be filtered.contains
stringOptional. If specified (and neither
message
norstart
are specified), the event must contain the string to be filtered.source
stringOptional. The event source.
Returns
- IEventFilterApplier
The new filter
Warning(Regex, string)
Create a filter for Akka.Event.Warning events. Events must match the specified pattern to be filtered.
source
being
null
does NOT work (passing null
disables the source filter).
public IEventFilterApplier Warning(Regex pattern, string source = null)
Parameters
pattern
RegexThe event must match the pattern to be filtered.
source
stringOptional. The event source.
Returns
- IEventFilterApplier
The new filter