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
loggerILogger<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
contextMessageContextThe message being processed.
nextMessageDelegateThe rest of the pipeline.
Returns
- Task
A task that completes when this step (and everything it invoked) has finished.