Search Results for

    Show / Hide Table of Contents

    Class RegexLogSourceFilter

    Uses a regular expression to filter log messages based on their source.

    Inheritance
    object
    LogFilterBase
    RegexLogSourceFilter
    Implements
    INoSerializationVerificationNeeded
    IDeadLetterSuppression
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Event
    Assembly: Akka.dll
    Syntax
    public sealed class RegexLogSourceFilter : LogFilterBase, INoSerializationVerificationNeeded, IDeadLetterSuppression

    Constructors

    | Edit this page View Source

    RegexLogSourceFilter(Regex)

    Declaration
    public RegexLogSourceFilter(Regex sourceRegex)
    Parameters
    Type Name Description
    Regex sourceRegex

    Properties

    | Edit this page View Source

    FilterType

    Which part of the log message this filter is evaluating?

    Declaration
    public override LogFilterType FilterType { get; }
    Property Value
    Type Description
    LogFilterType
    Overrides
    LogFilterBase.FilterType
    Remarks

    This actually has a performance implication - if we're filtering on the source, which is already fully "expanded" into its final string representation, we can try to fail fast on that without any additional allocations.

    If we're filtering on the message, we have to fully expand the log message first which involves allocations. Users on really tight performance budgets should be aware of this.

    Methods

    | Edit this page View Source

    ShouldKeepMessage(LogEvent, string?)

    Fast path designed to avoid allocating strings if we're filtering on the message content.

    Declaration
    public override LogFilterDecision ShouldKeepMessage(LogEvent content, string? expandedMessage = null)
    Parameters
    Type Name Description
    LogEvent content

    Usually the fully expanded message content.

    string expandedMessage

    The fully expanded message, optional.

    Returns
    Type Description
    LogFilterDecision
    Overrides
    LogFilterBase.ShouldKeepMessage(LogEvent, string?)

    Implements

    INoSerializationVerificationNeeded
    IDeadLetterSuppression

    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