Class LogFilterBase
Base class for all log filters
Inheritance
Inherited Members
Namespace: Akka.Event
Assembly: Akka.dll
Syntax
public abstract class LogFilterBase : INoSerializationVerificationNeeded, IDeadLetterSuppression
Remarks
Worth noting: these run inside the Logging actors, so they're out of band from any high performance workloads already.
In addition to this - all log filters will only run if the log level is enabled.
i.e. if we're at INFO level and the filter is set to a lower level, i.e. filtering DEBUG logs, the filter won't even run.
Properties
| Improve this Doc View SourceFilterType
Which part of the log message this filter is evaluating?
Declaration
public abstract LogFilterType FilterType { get; }
Property Value
Type | Description |
---|---|
LogFilterType |
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
| Improve this Doc View SourceShouldKeepMessage(LogEvent, String)
Fast path designed to avoid allocating strings if we're filtering on the message content.
Declaration
public abstract 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 |