diff --git a/src/core/Elsa.Core/Handlers/LogWorkflowExecution.cs b/src/core/Elsa.Core/Handlers/LogWorkflowExecution.cs index f16984a73..8763ab597 100644 --- a/src/core/Elsa.Core/Handlers/LogWorkflowExecution.cs +++ b/src/core/Elsa.Core/Handlers/LogWorkflowExecution.cs @@ -10,7 +10,6 @@ namespace Elsa.Handlers public class LogWorkflowExecution : INotificationHandler, INotificationHandler, INotificationHandler, INotificationHandler { private readonly ILogger _logger; - private readonly Stopwatch _stopwatch = new(); public LogWorkflowExecution(ILogger logger) { @@ -19,7 +18,6 @@ namespace Elsa.Handlers public Task Handle(ActivityExecuting notification, CancellationToken cancellationToken) { - _stopwatch.Start(); var activityBlueprint = notification.Activity; var activityId = activityBlueprint.Id; var workflowInstanceId = notification.WorkflowExecutionContext.WorkflowInstance.Id; @@ -29,11 +27,10 @@ namespace Elsa.Handlers public Task Handle(ActivityExecuted notification, CancellationToken cancellationToken) { - _stopwatch.Stop(); var activityBlueprint = notification.Activity; var activityId = activityBlueprint.Id; var workflowInstanceId = notification.WorkflowExecutionContext.WorkflowInstance.Id; - _logger.LogDebug("Executed activity {ActivityType} {ActivityId} for workflow {WorkflowInstanceId} in {ElapsedTime}", activityBlueprint.Type, activityId, workflowInstanceId, _stopwatch.Elapsed); + _logger.LogDebug("Executed activity {ActivityType} {ActivityId} for workflow {WorkflowInstanceId}", activityBlueprint.Type, activityId, workflowInstanceId); return Task.CompletedTask; }