Table of Contents

Class EventFilterFactory

Namespace
Akka.TestKit
Assembly
Akka.TestKit.dll

TBD

public class EventFilterFactory
Inheritance
EventFilterFactory
Inherited Members

Constructors

EventFilterFactory(TestKitBase)

TBD

public EventFilterFactory(TestKitBase testkit)

Parameters

testkit TestKitBase

TBD

EventFilterFactory(TestKitBase, ActorSystem)

TBD

public EventFilterFactory(TestKitBase testkit, ActorSystem system)

Parameters

testkit TestKitBase

TBD

system ActorSystem

TBD

EventFilterFactory(TestKitBase, ActorSystem, IReadOnlyList<EventFilterBase>)

TBD

public EventFilterFactory(TestKitBase testkit, ActorSystem actorSystem, IReadOnlyList<EventFilterBase> filters)

Parameters

testkit TestKitBase

TBD

actorSystem ActorSystem

TBD

filters IReadOnlyList<EventFilterBase>

TBD

Methods

CreateApplier(EventFilterBase, ActorSystem)

TBD

protected IEventFilterApplier CreateApplier(EventFilterBase filter, ActorSystem system)

Parameters

filter EventFilterBase

TBD

system ActorSystem

TBD

Returns

IEventFilterApplier

TBD

CreateMessageMatcher(string, string, string)

TBD

protected static IStringMatcher CreateMessageMatcher(string message, string start, string contains)

Parameters

message string

TBD

start string

TBD

contains string

TBD

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

IEventFilterApplier

TBD

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

IEventFilterApplier

TBD

Type Parameters

TLogEvent

TBD

DeadLetter()

Creates a filter that catches dead letters

public IEventFilterApplier DeadLetter()

Returns

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.

public IEventFilterApplier DeadLetter(Type type, Func<object, bool> isMatch, string source = null)

Parameters

type Type

TBD

isMatch Func<object, bool>

TBD

source string

TBD

Returns

IEventFilterApplier

TBD

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

type Type

TBD

source string

TBD

Returns

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.

public IEventFilterApplier DeadLetter<TMessage>(Func<TMessage, bool> isMatch, string source = null)

Parameters

isMatch Func<TMessage, bool>

TBD

source string

TBD

Returns

IEventFilterApplier

TBD

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 string

TBD

Returns

IEventFilterApplier

TBD

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.

Debug() // filter all Debug events Debug("message") // filter on exactly matching message Debug(source: obj) // filter on event source Debug(start: "Expected") // filter on start of message Debug(contains: "Expected") // filter on part of message Please note that filtering on the 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 string

Optional. If specified the event must match it exactly to be filtered.

start string

Optional. If specified (and message is not specified), the event must start with the string to be filtered.

contains string

Optional. If specified (and neither message nor start are specified), the event must contain the string to be filtered.

source string

Optional. 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. Debug(pattern: new Regex("weird.*message"), source: obj) // filter on pattern and source Please note that filtering on the source being null does NOT work (passing null disables the source filter).

public IEventFilterApplier Debug(Regex pattern, string source = null)

Parameters

pattern Regex

The event must match the pattern to be filtered.

source string

Optional. 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.

Error() // filter all Error events Error("message") // filter on exactly matching message Error(source: obj) // filter on event source Error(start: "Expected") // filter on start of message Error(contains: "Expected") // filter on part of message Please note that filtering on the 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 string

Optional. If specified the event must match it exactly to be filtered.

start string

Optional. If specified (and message is not specified), the event must start with the string to be filtered.

contains string

Optional. If specified (and neither message nor start are specified), the event must contain the string to be filtered.

source string

Optional. 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. Error(pattern: new Regex("weird.*message"), source: obj) // filter on pattern and source Please note that filtering on the source being null does NOT work (passing null disables the source filter).

public IEventFilterApplier Error(Regex pattern, string source = null)

Parameters

pattern Regex

The event must match the pattern to be filtered.

source string

Optional. 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.

Exception(typeof(MyException)) // filter only on exception type Exception(typeof(MyException), "message") // filter on exactly matching message Exception(typeof(MyException), source: obj) // filter on event source Exception(typeof(MyException), start: "Expected") // filter on start of message Please note that filtering on the 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 Type

The type of the exception. It must be a Exception.

message string

Optional. If specified the event must match it exactly to be filtered.

start string

Optional. If specified (and message is not specified, the event must start with the string to be filtered.

contains string

Optional. If specified (and neither message nor start are specified), the event must contain the string to be filtered.

source string

Optional. The event source.

checkInnerExceptions bool

Optional. 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. Exception<MyException>(pattern: new Regex("weird.*message"), source: obj) // filter on pattern and source Please note that filtering on the 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 Type

The type of the exception. It must be a Exception.

pattern Regex

The event must match the pattern to be filtered.

source string

Optional. The event source.

checkInnerExceptions bool

Optional. 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.

Exception<MyException>() // filter only on exception type Exception<MyException>("message") // filter on exactly matching message Exception<MyException>(source: obj) // filter on event source Exception<MyException>(start: "Expected") // filter on start of message Please note that filtering on the 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 string

Optional. If specified the event must match it exactly to be filtered.

start string

Optional. If specified (and message is not specified, the event must start with the string to be filtered.

contains string

Optional. If specified (and neither message nor start are specified), the event must contain the string to be filtered.

source string

Optional. 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. Exception<MyException>(pattern: new Regex("weird.*message"), source: obj) // filter on pattern and source Please note that filtering on the 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 Regex

The event must match the pattern to be filtered.

source string

Optional. 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 LogLevel

The log level used to match events being filtered.

message string

Optional. If specified the event must match it exactly to be filtered.

start string

Optional. If specified (and message is not specified), the event must start with the string to be filtered.

contains string

Optional. If specified (and neither message nor start are specified), the event must contain the string to be filtered.

source string

Optional. 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 LogLevel

The log level used to match events being filtered.

pattern Regex

The event must match the pattern to be filtered.

source string

Optional. The event source.

Returns

IEventFilterApplier

An event filter that matches the given logLevel with the supplied pattern.

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.

Info() // filter all Info events Info("message") // filter on exactly matching message Info(source: obj) // filter on event source Info(start: "Expected") // filter on start of message Info(contains: "Expected") // filter on part of message Please note that filtering on the 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 string

Optional. If specified the event must match it exactly to be filtered.

start string

Optional. If specified (and message is not specified), the event must start with the string to be filtered.

contains string

Optional. If specified (and neither message nor start are specified), the event must contain the string to be filtered.

source string

Optional. 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. Info(pattern: new Regex("weird.*message"), source: obj) // filter on pattern and source Please note that filtering on the source being null does NOT work (passing null disables the source filter).

public IEventFilterApplier Info(Regex pattern, string source = null)

Parameters

pattern Regex

The event must match the pattern to be filtered.

source string

Optional. 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.

Warning() // filter all Warning events Warning("message") // filter on exactly matching message Warning(source: obj) // filter on event source Warning(start: "Expected") // filter on start of message Warning(contains: "Expected") // filter on part of message Please note that filtering on the 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 string

Optional. If specified the event must match it exactly to be filtered.

start string

Optional. If specified (and message is not specified), the event must start with the string to be filtered.

contains string

Optional. If specified (and neither message nor start are specified), the event must contain the string to be filtered.

source string

Optional. 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. Warning(pattern: new Regex("weird.*message"), source: obj) // filter on pattern and source Please note that filtering on the source being null does NOT work (passing null disables the source filter).

public IEventFilterApplier Warning(Regex pattern, string source = null)

Parameters

pattern Regex

The event must match the pattern to be filtered.

source string

Optional. The event source.

Returns

IEventFilterApplier

The new filter