Class EventFilterFactory
TBD
Inherited Members
Namespace: Akka.TestKit
Assembly: Akka.TestKit.dll
Syntax
public class EventFilterFactory
Constructors
| Edit this page 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
| Edit this page 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, bool>, 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, bool> | 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, bool>, 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, bool> | 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?, bool)
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 |
|
| bool | checkInnerExceptions | Optional. When set to |
Returns
| Type | Description |
|---|---|
| IEventFilterApplier | The new filter |
Exception(Type, Regex, string?, bool)
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 |
|
| bool | 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 |
Edit this page