Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the names of the fields in the logs have been changed #1073

Merged
merged 2 commits into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/WorkflowCore/Services/BackgroundTasks/EventConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private async Task<bool> SeedSubscription(Event evt, EventSubscription sub, Hash

if (!await _lockProvider.AcquireLock(sub.WorkflowId, cancellationToken))
{
Logger.LogInformation("Workflow locked {0}", sub.WorkflowId);
Logger.LogInformation("Workflow locked {WorkflowId}", sub.WorkflowId);
return false;
}

Expand Down Expand Up @@ -151,4 +151,4 @@ private async Task<bool> SeedSubscription(Event evt, EventSubscription sub, Hash
}
}
}
}
}
4 changes: 2 additions & 2 deletions src/WorkflowCore/Services/BackgroundTasks/RunnablePoller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ await _persistenceStore.ScheduleCommand(new ScheduledCommand()
_logger.LogDebug($"Got greylisted workflow {item}");
continue;
}
_logger.LogDebug("Got runnable instance {0}", item);
_logger.LogDebug("Got runnable instance {Item}", item);
_greylist.Add($"wf:{item}");
await _queueProvider.QueueWork(item, QueueType.Workflow);
}
Expand Down Expand Up @@ -218,4 +218,4 @@ await _persistenceStore.ProcessCommands(new DateTimeOffset(_dateTimeProvider.Utc
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected override async Task ProcessItem(string itemId, CancellationToken cance
{
if (!await _lockProvider.AcquireLock(itemId, cancellationToken))
{
Logger.LogInformation("Workflow locked {0}", itemId);
Logger.LogInformation("Workflow locked {ItemId}", itemId);
return;
}

Expand Down Expand Up @@ -165,4 +165,4 @@ private async void FutureQueue(WorkflowInstance workflow, CancellationToken canc
}
}
}
}
}
4 changes: 2 additions & 2 deletions src/WorkflowCore/Services/WorkflowController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ await _eventHub.PublishNotification(new WorkflowStarted

public async Task PublishEvent(string eventName, string eventKey, object eventData, DateTime? effectiveDate = null)
{
_logger.LogDebug("Creating event {0} {1}", eventName, eventKey);
_logger.LogDebug("Creating event {EventName} {EventKey}", eventName, eventKey);
Event evt = new Event();

if (effectiveDate.HasValue)
Expand Down Expand Up @@ -241,4 +241,4 @@ public void RegisterWorkflow<TWorkflow, TData>()
_registry.RegisterWorkflow(wf);
}
}
}
}
12 changes: 6 additions & 6 deletions src/WorkflowCore/Services/WorkflowExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public async Task<WorkflowExecutorResult> Execute(WorkflowInstance workflow, Can
var def = _registry.GetDefinition(workflow.WorkflowDefinitionId, workflow.Version);
if (def == null)
{
_logger.LogError("Workflow {0} version {1} is not registered", workflow.WorkflowDefinitionId, workflow.Version);
_logger.LogError("Workflow {WorkflowDefinitionId} version {Version} is not registered", workflow.WorkflowDefinitionId, workflow.Version);
return wfResult;
}

Expand All @@ -61,7 +61,7 @@ public async Task<WorkflowExecutorResult> Execute(WorkflowInstance workflow, Can
var step = def.Steps.FindById(pointer.StepId);
if (step == null)
{
_logger.LogError("Unable to find step {0} in workflow definition", pointer.StepId);
_logger.LogError("Unable to find step {StepId} in workflow definition", pointer.StepId);
pointer.SleepUntil = _datetimeProvider.UtcNow.Add(_options.ErrorRetryInterval);
wfResult.Errors.Add(new ExecutionError
{
Expand All @@ -83,7 +83,7 @@ public async Task<WorkflowExecutorResult> Execute(WorkflowInstance workflow, Can
}
catch (Exception ex)
{
_logger.LogError(ex, "Workflow {0} raised error on step {1} Message: {2}", workflow.Id, pointer.StepId, ex.Message);
_logger.LogError(ex, "Workflow {WorkflowId} raised error on step {StepId} Message: {Message}", workflow.Id, pointer.StepId, ex.Message);
wfResult.Errors.Add(new ExecutionError
{
WorkflowId = workflow.Id,
Expand Down Expand Up @@ -158,14 +158,14 @@ private async Task ExecuteStep(WorkflowInstance workflow, WorkflowStep step, Exe

using (var scope = _scopeProvider.CreateScope(context))
{
_logger.LogDebug("Starting step {0} on workflow {1}", step.Name, workflow.Id);
_logger.LogDebug("Starting step {StepName} on workflow {WorkflowId}", step.Name, workflow.Id);

IStepBody body = step.ConstructBody(scope.ServiceProvider);
var stepExecutor = scope.ServiceProvider.GetRequiredService<IStepExecutor>();

if (body == null)
{
_logger.LogError("Unable to construct step body {0}", step.BodyType.ToString());
_logger.LogError("Unable to construct step body {BodyType}", step.BodyType.ToString());
pointer.SleepUntil = _datetimeProvider.UtcNow.Add(_options.ErrorRetryInterval);
wfResult.Errors.Add(new ExecutionError
{
Expand Down Expand Up @@ -275,4 +275,4 @@ private async Task DetermineNextExecutionTime(WorkflowInstance workflow, Workflo
});
}
}
}
}