Class EventFilterFactory
TBD
Inherited Members
Namespace: Akka.TestKit
Assembly: Akka.TestKit.dll
Syntax
public class EventFilterFactory
Constructors
| Improve this Doc View SourceEventFilterFactory(TestKitBase)
TBD
Declaration
public EventFilterFactory(TestKitBase testkit)
Parameters
Type | Name | Description |
---|---|---|
TestKitBase | testkit | TBD |
EventFilterFactory(TestKitBase, ActorSystem)
TBD
Declaration
public EventFilterFactory(TestKitBase testkit, ActorSystem system)
Parameters
Type | Name | Description |
---|---|---|
TestKitBase | testkit | TBD |
ActorSystem | system | TBD |
EventFilterFactory(TestKitBase, ActorSystem, IReadOnlyList<EventFilterBase>)
TBD
Declaration
public EventFilterFactory(TestKitBase testkit, ActorSystem actorSystem, IReadOnlyList<EventFilterBase> filters)
Parameters
Type | Name | Description |
---|---|---|
TestKitBase | testkit | TBD |
ActorSystem | actorSystem | TBD |
IReadOnlyList<EventFilterBase> | filters | TBD |
Methods
| Improve this Doc View SourceCreateApplier(EventFilterBase, ActorSystem)
TBD
Declaration
protected IEventFilterApplier CreateApplier(EventFilterBase filter, ActorSystem system)
Parameters
Type | Name | Description |
---|---|---|
EventFilterBase | filter | TBD |
ActorSystem | system | TBD |
Returns
Type | Description |
---|---|
IEventFilterApplier | TBD |
CreateMessageMatcher(String, String, String)
TBD
Declaration
protected static IStringMatcher CreateMessageMatcher(string message, string start, string contains)
Parameters
Type | Name | Description |
---|---|---|
String | message | TBD |
String | start | TBD |
String | contains | TBD |
Returns
Type | Description |
---|---|
IStringMatcher | TBD |
Custom(Predicate<LogEvent>)
Create a custom event filter. The filter will affect those events for
which the predicate
function returns true
.
Declaration
public IEventFilterApplier Custom(Predicate<LogEvent> predicate)
Parameters
Type | Name | Description |
---|---|---|
Predicate<LogEvent> | predicate | This function must return |
Returns
Type | Description |
---|---|
IEventFilterApplier | TBD |
Custom<TLogEvent>(Predicate<TLogEvent>)
Create a custom event filter. The filter will affect those events for
which the predicate
function returns true
.
Declaration
public IEventFilterApplier Custom<TLogEvent>(Predicate<TLogEvent> predicate)
where TLogEvent : LogEvent
Parameters
Type | Name | Description |
---|---|---|
Predicate<TLogEvent> | predicate | This function must return |
Returns
Type | Description |
---|---|
IEventFilterApplier | TBD |
Type Parameters
Name | Description |
---|---|
TLogEvent | TBD |
DeadLetter()
Creates a filter that catches dead letters
Declaration
public IEventFilterApplier DeadLetter()
Returns
Type | Description |
---|---|
IEventFilterApplier | TBD |
DeadLetter(Type, Func<Object, Boolean>, String)
Creates a filter that catches dead letters of the specified type and matches the predicate, and optionally from the specified source.
Declaration
public IEventFilterApplier DeadLetter(Type type, Func<object, bool> isMatch, string source = null)
Parameters
Type | Name | Description |
---|---|---|
Type | type | TBD |
Func<Object, Boolean> | isMatch | TBD |
String | source | TBD |
Returns
Type | Description |
---|---|
IEventFilterApplier | TBD |
DeadLetter(Type, String)
Creates a filter that catches dead letters of the specified type and, optionally from the specified source.
Declaration
public IEventFilterApplier DeadLetter(Type type, string source = null)
Parameters
Type | Name | Description |
---|---|---|
Type | type | TBD |
String | source | TBD |
Returns
Type | Description |
---|---|
IEventFilterApplier | TBD |
DeadLetter<TMessage>(Func<TMessage, Boolean>, String)
Creates a filter that catches dead letters of the specified type and matches the predicate, and optionally from the specified source.
Declaration
public IEventFilterApplier DeadLetter<TMessage>(Func<TMessage, bool> isMatch, string source = null)
Parameters
Type | Name | Description |
---|---|---|
Func<TMessage, Boolean> | isMatch | TBD |
String | source | TBD |
Returns
Type | Description |
---|---|
IEventFilterApplier | TBD |
Type Parameters
Name | Description |
---|---|
TMessage | TBD |
DeadLetter<TMessage>(String)
Creates a filter that catches dead letters of the specified type and, optionally from the specified source.
Declaration
public IEventFilterApplier DeadLetter<TMessage>(string source = null)
Parameters
Type | Name | Description |
---|---|---|
String | source | TBD |
Returns
Type | Description |
---|---|
IEventFilterApplier | TBD |
Type Parameters
Name | Description |
---|---|
TMessage | TBD |
Debug(String, String, String, String)
Create a filter for 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).
Declaration
public IEventFilterApplier Debug(string message = null, string start = null, string contains = null, string source = null)
Parameters
Type | Name | Description |
---|---|---|
String | message | Optional. If specified the event must match it exactly to be filtered. |
String | start | Optional. If specified (and |
String | contains | Optional. If specified (and neither |
String | source | Optional. The event source. |
Returns
Type | Description |
---|---|
IEventFilterApplier | The new filter |
Debug(Regex, String)
Create a filter for Debug events. Events must match the specified pattern to be filtered.
source
being
null
does NOT work (passing null
disables the source filter).
Declaration
public IEventFilterApplier Debug(Regex pattern, string source = null)
Parameters
Type | Name | Description |
---|---|---|
Regex | pattern | The event must match the pattern to be filtered. |
String | source |
|
Returns
Type | Description |
---|---|
IEventFilterApplier | The new filter |
Error(String, String, String, String)
Create a filter for 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).
Declaration
public IEventFilterApplier Error(string message = null, string start = null, string contains = null, string source = null)
Parameters
Type | Name | Description |
---|---|---|
String | message | Optional. If specified the event must match it exactly to be filtered. |
String | start | Optional. If specified (and |
String | contains | Optional. If specified (and neither |
String | source | Optional. The event source. |
Returns
Type | Description |
---|---|
IEventFilterApplier | The new filter |
Error(Regex, String)
Create a filter for Error events. Events must match the specified pattern to be filtered.
source
being
null
does NOT work (passing null
disables the source filter).
Declaration
public IEventFilterApplier Error(Regex pattern, string source = null)
Parameters
Type | Name | Description |
---|---|---|
Regex | pattern | The event must match the pattern to be filtered. |
String | source |
|
Returns
Type | Description |
---|---|
IEventFilterApplier | The new filter |
Exception(Type, String, String, String, String, Boolean)
Create a filter for 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).
Declaration
public IEventFilterApplier Exception(Type exceptionType, string message = null, string start = null, string contains = null, string source = null, bool checkInnerExceptions = false)
Parameters
Type | Name | Description |
---|---|---|
Type | exceptionType | The type of the exception. It must be a Exception. |
String | message | Optional. If specified the event must match it exactly to be filtered. |
String | start |
|
String | contains | Optional. If specified (and neither |
String | source |
|
Boolean | checkInnerExceptions | Optional. When set to |
Returns
Type | Description |
---|---|
IEventFilterApplier | The new filter |
Exception(Type, Regex, String, Boolean)
Create a filter for Error events. Events must match the specified pattern to be filtered.
source
being
null
does NOT work (passing null
disables the source filter).
Declaration
public IEventFilterApplier Exception(Type exceptionType, Regex pattern, string source = null, bool checkInnerExceptions = false)
Parameters
Type | Name | Description |
---|---|---|
Type | exceptionType | The type of the exception. It must be a Exception. |
Regex | pattern | The event must match the pattern to be filtered. |
String | source |
|
Boolean | checkInnerExceptions | Optional. When set to |
Returns
Type | Description |
---|---|
IEventFilterApplier | The new filter |
Exception<TException>(String, String, String, String)
Create a filter for 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).
Declaration
public IEventFilterApplier Exception<TException>(string message = null, string start = null, string contains = null, string source = null)
where TException : Exception
Parameters
Type | Name | Description |
---|---|---|
String | message | Optional. If specified the event must match it exactly to be filtered. |
String | start |
|
String | contains | Optional. If specified (and neither |
String | source |
|
Returns
Type | Description |
---|---|
IEventFilterApplier | The new filter |
Type Parameters
Name | Description |
---|---|
TException | The type of the exception. |
Exception<TException>(Regex, String)
Create a filter for Error events. Events must match the specified pattern to be filtered.
source
being
null
does NOT work (passing null
disables the source filter).
Declaration
public IEventFilterApplier Exception<TException>(Regex pattern, string source = null)
where TException : Exception
Parameters
Type | Name | Description |
---|---|---|
Regex | pattern | The event must match the pattern to be filtered. |
String | source |
|
Returns
Type | Description |
---|---|
IEventFilterApplier | The new filter |
Type Parameters
Name | Description |
---|---|
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.
Declaration
public IEventFilterApplier ForLogLevel(LogLevel logLevel, string message = null, string start = null, string contains = null, string source = null)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | logLevel | The log level used to match events being filtered. |
String | message | Optional. If specified the event must match it exactly to be filtered. |
String | start | Optional. If specified (and |
String | contains | Optional. If specified (and neither |
String | source | Optional. The event source. |
Returns
Type | Description |
---|---|
IEventFilterApplier | An event filter that matches on the given |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | This exception is thrown when the given |
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.
Declaration
public IEventFilterApplier ForLogLevel(LogLevel logLevel, Regex pattern, string source = null)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | logLevel | The log level used to match events being filtered. |
Regex | pattern | The event must match the pattern to be filtered. |
String | source |
|
Returns
Type | Description |
---|---|
IEventFilterApplier | An event filter that matches the given |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | This exception is thrown when the given |
Info(String, String, String, String)
Create a filter for 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).
Declaration
public IEventFilterApplier Info(string message = null, string start = null, string contains = null, string source = null)
Parameters
Type | Name | Description |
---|---|---|
String | message | Optional. If specified the event must match it exactly to be filtered. |
String | start | Optional. If specified (and |
String | contains | Optional. If specified (and neither |
String | source | Optional. The event source. |
Returns
Type | Description |
---|---|
IEventFilterApplier | The new filter |
Info(Regex, String)
Create a filter for Info events. Events must match the specified pattern to be filtered.
source
being
null
does NOT work (passing null
disables the source filter).
Declaration
public IEventFilterApplier Info(Regex pattern, string source = null)
Parameters
Type | Name | Description |
---|---|---|
Regex | pattern | The event must match the pattern to be filtered. |
String | source |
|
Returns
Type | Description |
---|---|
IEventFilterApplier | The new filter |
Warning(String, String, String, String)
Create a filter for 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).
Declaration
public IEventFilterApplier Warning(string message = null, string start = null, string contains = null, string source = null)
Parameters
Type | Name | Description |
---|---|---|
String | message | Optional. If specified the event must match it exactly to be filtered. |
String | start | Optional. If specified (and |
String | contains | Optional. If specified (and neither |
String | source | Optional. The event source. |
Returns
Type | Description |
---|---|
IEventFilterApplier | The new filter |
Warning(Regex, String)
Create a filter for Warning events. Events must match the specified pattern to be filtered.
source
being
null
does NOT work (passing null
disables the source filter).
Declaration
public IEventFilterApplier Warning(Regex pattern, string source = null)
Parameters
Type | Name | Description |
---|---|---|
Regex | pattern | The event must match the pattern to be filtered. |
String | source |
|
Returns
Type | Description |
---|---|
IEventFilterApplier | The new filter |