mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
Chained commands keep the same CommandId in nlog context
This commit is contained in:
parent
c184ec2d98
commit
1166a81eb3
@ -145,7 +145,10 @@ private void ExecuteCommand<TCommand>(TrackedCommand trackedCommand) where TComm
|
||||
|
||||
try
|
||||
{
|
||||
MappedDiagnosticsContext.Set("CommandId", trackedCommand.Command.CommandId);
|
||||
if (!MappedDiagnosticsContext.Contains("CommandId"))
|
||||
{
|
||||
MappedDiagnosticsContext.Set("CommandId", trackedCommand.Command.CommandId);
|
||||
}
|
||||
|
||||
PublishEvent(new CommandStartedEvent(trackedCommand));
|
||||
handler.Execute(command);
|
||||
|
Loading…
Reference in New Issue
Block a user