Class LoggerScopeExtensions
- Namespace
- Stratara.Shared.Diagnostics.Extensions
- Assembly
- Stratara.Diagnostics.dll
Pre-baked logging-scope helpers for the create/update aggregate flows. Use these so that every log entry inside the scope picks up the aggregate id automatically.
public static class LoggerScopeExtensions
- Inheritance
-
LoggerScopeExtensions
- Inherited Members
Methods
BeginCreateAggregateScope(ILogger, Guid)
Begin a logging scope tagged with AggregateId = aggregateId
for the create-aggregate flow.
public static IDisposable? BeginCreateAggregateScope(this ILogger logger, Guid aggregateId)
Parameters
Returns
- IDisposable
A disposable that ends the scope, or
nullwhen no scope provider is configured.
BeginUpdateAggregateScope(ILogger, Guid)
Begin a logging scope tagged with AggregateId = aggregateId
for the update-aggregate flow.
public static IDisposable? BeginUpdateAggregateScope(this ILogger logger, Guid aggregateId)
Parameters
Returns
- IDisposable
A disposable that ends the scope, or
nullwhen no scope provider is configured.