Chained commands keep the same CommandId in nlog context

pull/4/head
Mark McDowall 11 years ago
parent c184ec2d98
commit 1166a81eb3

@ -144,8 +144,11 @@ namespace NzbDrone.Common.Messaging
var sw = Stopwatch.StartNew();
try
{
if (!MappedDiagnosticsContext.Contains("CommandId"))
{
MappedDiagnosticsContext.Set("CommandId", trackedCommand.Command.CommandId);
}
PublishEvent(new CommandStartedEvent(trackedCommand));
handler.Execute(command);

Loading…
Cancel
Save