Table of Contents

Class AuditLoggingOptions

Namespace
Excalibur.Dispatch.Options.Middleware
Assembly
Excalibur.Dispatch.dll

Configuration options for audit logging middleware.

public sealed class AuditLoggingOptions
Inheritance
AuditLoggingOptions
Inherited Members
Extension Methods

Properties

CorrelationIdExtractor

Gets or sets a function to extract the correlation ID from the message context.

public Func<IMessageContext, string?>? CorrelationIdExtractor { get; set; }

Property Value

Func<IMessageContext, string>

The current CorrelationIdExtractor value.

IncludeSensitiveData

Gets or sets a value indicating whether to include sensitive data in audit logs.

public bool IncludeSensitiveData { get; set; }

Property Value

bool

Default is false.

LogMessagePayload

Gets or sets a value indicating whether to log message payloads.

public bool LogMessagePayload { get; set; }

Property Value

bool

Default is false for security and performance reasons.

MaxPayloadDepth

Gets or sets the maximum depth when serializing message payload.

[Range(1, 2147483647)]
public int MaxPayloadDepth { get; set; }

Property Value

int

Default is 5.

MaxPayloadSize

Gets or sets the maximum size of message payload to log (in characters).

[Range(1, 2147483647)]
public int MaxPayloadSize { get; set; }

Property Value

int

Default is 10,000 characters.

PayloadFilter

Gets or sets a function to determine whether to log the payload for a specific message.

public Func<IDispatchMessage, bool>? PayloadFilter { get; set; }

Property Value

Func<IDispatchMessage, bool>

The current PayloadFilter value.

Remarks

If null, payload logging is controlled by the LogMessagePayload property.

UserIdExtractor

Gets or sets a function to extract the user ID from the message context.

public Func<IMessageContext, string?>? UserIdExtractor { get; set; }

Property Value

Func<IMessageContext, string>

The current UserIdExtractor value.