Table of Contents

Class LoggingMiddleware

Namespace
Signal.Application.Pipeline
Assembly
Signal.Application.dll

Logs every processed envelope with its duration at Debug.

public sealed class LoggingMiddleware : IMessageMiddleware
Inheritance
LoggingMiddleware
Implements
Inherited Members

Constructors

LoggingMiddleware(ILogger<LoggingMiddleware>)

Logs every processed envelope with its duration at Debug.

public LoggingMiddleware(ILogger<LoggingMiddleware> logger)

Parameters

logger ILogger<LoggingMiddleware>

The logger.

Methods

InvokeAsync(MessageContext, MessageDelegate)

Processes the message. Call next to continue; skip it to stop processing.

public Task InvokeAsync(MessageContext context, MessageDelegate next)

Parameters

context MessageContext

The message being processed.

next MessageDelegate

The rest of the pipeline.

Returns

Task

A task that completes when this step (and everything it invoked) has finished.