Search Results for

    Show / Hide Table of Contents

    Class EventFilterFactory

    TBD

    Inheritance
    object
    EventFilterFactory
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.TestKit
    Assembly: Akka.TestKit.dll
    Syntax
    public class EventFilterFactory

    Constructors

    | Edit this page View Source

    EventFilterFactory(TestKitBase)

    TBD

    Declaration
    public EventFilterFactory(TestKitBase testkit)
    Parameters
    Type Name Description
    TestKitBase testkit

    TBD

    | Edit this page View Source

    EventFilterFactory(TestKitBase, ActorSystem)

    TBD

    Declaration
    public EventFilterFactory(TestKitBase testkit, ActorSystem system)
    Parameters
    Type Name Description
    TestKitBase testkit

    TBD

    ActorSystem system

    TBD

    | Edit this page View Source

    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 Source

    CreateApplier(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

    | Edit this page View Source

    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

    | Edit this page View Source

    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 true for events that should be filtered.

    Returns
    Type Description
    IEventFilterApplier

    TBD

    | Edit this page View Source

    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 true for events that should be filtered.

    Returns
    Type Description
    IEventFilterApplier

    TBD

    Type Parameters
    Name Description
    TLogEvent

    TBD

    | Edit this page View Source

    DeadLetter()

    Creates a filter that catches dead letters

    Declaration
    public IEventFilterApplier DeadLetter()
    Returns
    Type Description
    IEventFilterApplier

    TBD

    | Edit this page View Source

    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

    | Edit this page View Source

    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

    | Edit this page View Source

    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

    | Edit this page View Source

    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

    | Edit this page View Source

    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.

    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).
    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 message is not specified), the event must start with the string to be filtered.

    string contains

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

    string source

    Optional. The event source.

    Returns
    Type Description
    IEventFilterApplier

    The new filter

    | Edit this page View Source

    Debug(Regex, string)

    Create a filter for 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).

    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

    Optional. The event source.

    Returns
    Type Description
    IEventFilterApplier

    The new filter

    | Edit this page View Source

    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.

    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).
    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 message is not specified), the event must start with the string to be filtered.

    string contains

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

    string source

    Optional. The event source.

    Returns
    Type Description
    IEventFilterApplier

    The new filter

    | Edit this page View Source

    Error(Regex, string)

    Create a filter for 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).

    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

    Optional. The event source.

    Returns
    Type Description
    IEventFilterApplier

    The new filter

    | Edit this page View Source

    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.

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

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

    string contains

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

    string source

    Optional. The event source.

    bool checkInnerExceptions

    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
    Type Description
    IEventFilterApplier

    The new filter

    | Edit this page View Source

    Exception(Type, Regex, string, bool)

    Create a filter for 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).

    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

    Optional. The event source.

    bool checkInnerExceptions

    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
    Type Description
    IEventFilterApplier

    The new filter

    | Edit this page View Source

    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.

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

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

    string contains

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

    string source

    Optional. The event source.

    Returns
    Type Description
    IEventFilterApplier

    The new filter

    Type Parameters
    Name Description
    TException

    The type of the exception.

    | Edit this page View Source

    Exception<TException>(Regex, string)

    Create a filter for 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).

    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

    Optional. The event source.

    Returns
    Type Description
    IEventFilterApplier

    The new filter

    Type Parameters
    Name Description
    TException

    The type of the exception.

    | Edit this page View Source

    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 message is not specified), the event must start with the string to be filtered.

    string contains

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

    string source

    Optional. The event source.

    Returns
    Type Description
    IEventFilterApplier

    An event filter that matches on the given logLevel.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    This exception is thrown when the given logLevel is unknown.

    | Edit this page View Source

    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

    Optional. The event source.

    Returns
    Type Description
    IEventFilterApplier

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

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    This exception is thrown when the given logLevel is unknown.

    | Edit this page View Source

    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.

    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).
    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 message is not specified), the event must start with the string to be filtered.

    string contains

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

    string source

    Optional. The event source.

    Returns
    Type Description
    IEventFilterApplier

    The new filter

    | Edit this page View Source

    Info(Regex, string)

    Create a filter for 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).

    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

    Optional. The event source.

    Returns
    Type Description
    IEventFilterApplier

    The new filter

    | Edit this page View Source

    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.

    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).
    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 message is not specified), the event must start with the string to be filtered.

    string contains

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

    string source

    Optional. The event source.

    Returns
    Type Description
    IEventFilterApplier

    The new filter

    | Edit this page View Source

    Warning(Regex, string)

    Create a filter for 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).

    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

    Optional. The event source.

    Returns
    Type Description
    IEventFilterApplier

    The new filter

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET