mirror of
https://github.com/Radarr/Radarr
synced 2025-03-15 16:29:46 +00:00
Chained commands keep the same CommandId in nlog context
This commit is contained in:
parent
c184ec2d98
commit
1166a81eb3
1 changed files with 4 additions and 1 deletions
|
@ -145,7 +145,10 @@ namespace NzbDrone.Common.Messaging
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
MappedDiagnosticsContext.Set("CommandId", trackedCommand.Command.CommandId);
|
if (!MappedDiagnosticsContext.Contains("CommandId"))
|
||||||
|
{
|
||||||
|
MappedDiagnosticsContext.Set("CommandId", trackedCommand.Command.CommandId);
|
||||||
|
}
|
||||||
|
|
||||||
PublishEvent(new CommandStartedEvent(trackedCommand));
|
PublishEvent(new CommandStartedEvent(trackedCommand));
|
||||||
handler.Execute(command);
|
handler.Execute(command);
|
||||||
|
|
Loading…
Add table
Reference in a new issue