Class RegexLogSourceFilter
Uses a regular expression to filter log messages based on their source.
Inherited Members
Namespace: Akka.Event
Assembly: Akka.dll
Syntax
public sealed class RegexLogSourceFilter : LogFilterBase, INoSerializationVerificationNeeded, IDeadLetterSuppression
Constructors
| Edit this page View SourceRegexLogSourceFilter(Regex)
Declaration
public RegexLogSourceFilter(Regex sourceRegex)
Parameters
Type | Name | Description |
---|---|---|
Regex | sourceRegex |
Properties
| Edit this page View SourceFilterType
Which part of the log message this filter is evaluating?
Declaration
public override LogFilterType FilterType { get; }
Property Value
Type | Description |
---|---|
LogFilterType |
Overrides
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 SourceShouldKeepMessage(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 |