Skip to content

Commit 3112482

Browse files
authored
Merge pull request #1073 from pashtetus1/issue-1072
the names of the fields in the logs have been changed
2 parents b8c9e2c + 0ef8be8 commit 3112482

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

src/WorkflowCore/Services/BackgroundTasks/EventConsumer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ private async Task<bool> SeedSubscription(Event evt, EventSubscription sub, Hash
114114

115115
if (!await _lockProvider.AcquireLock(sub.WorkflowId, cancellationToken))
116116
{
117-
Logger.LogInformation("Workflow locked {0}", sub.WorkflowId);
117+
Logger.LogInformation("Workflow locked {WorkflowId}", sub.WorkflowId);
118118
return false;
119119
}
120120

@@ -151,4 +151,4 @@ private async Task<bool> SeedSubscription(Event evt, EventSubscription sub, Hash
151151
}
152152
}
153153
}
154-
}
154+
}

src/WorkflowCore/Services/BackgroundTasks/RunnablePoller.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ await _persistenceStore.ScheduleCommand(new ScheduledCommand()
9494
_logger.LogDebug($"Got greylisted workflow {item}");
9595
continue;
9696
}
97-
_logger.LogDebug("Got runnable instance {0}", item);
97+
_logger.LogDebug("Got runnable instance {Item}", item);
9898
_greylist.Add($"wf:{item}");
9999
await _queueProvider.QueueWork(item, QueueType.Workflow);
100100
}
@@ -218,4 +218,4 @@ await _persistenceStore.ProcessCommands(new DateTimeOffset(_dateTimeProvider.Utc
218218
}
219219
}
220220
}
221-
}
221+
}

src/WorkflowCore/Services/BackgroundTasks/WorkflowConsumer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected override async Task ProcessItem(string itemId, CancellationToken cance
3333
{
3434
if (!await _lockProvider.AcquireLock(itemId, cancellationToken))
3535
{
36-
Logger.LogInformation("Workflow locked {0}", itemId);
36+
Logger.LogInformation("Workflow locked {ItemId}", itemId);
3737
return;
3838
}
3939

@@ -165,4 +165,4 @@ private async void FutureQueue(WorkflowInstance workflow, CancellationToken canc
165165
}
166166
}
167167
}
168-
}
168+
}

src/WorkflowCore/Services/WorkflowController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ await _eventHub.PublishNotification(new WorkflowStarted
107107

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

113113
if (effectiveDate.HasValue)
@@ -241,4 +241,4 @@ public void RegisterWorkflow<TWorkflow, TData>()
241241
_registry.RegisterWorkflow(wf);
242242
}
243243
}
244-
}
244+
}

src/WorkflowCore/Services/WorkflowExecutor.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public async Task<WorkflowExecutorResult> Execute(WorkflowInstance workflow, Can
4747
var def = _registry.GetDefinition(workflow.WorkflowDefinitionId, workflow.Version);
4848
if (def == null)
4949
{
50-
_logger.LogError("Workflow {0} version {1} is not registered", workflow.WorkflowDefinitionId, workflow.Version);
50+
_logger.LogError("Workflow {WorkflowDefinitionId} version {Version} is not registered", workflow.WorkflowDefinitionId, workflow.Version);
5151
return wfResult;
5252
}
5353

@@ -61,7 +61,7 @@ public async Task<WorkflowExecutorResult> Execute(WorkflowInstance workflow, Can
6161
var step = def.Steps.FindById(pointer.StepId);
6262
if (step == null)
6363
{
64-
_logger.LogError("Unable to find step {0} in workflow definition", pointer.StepId);
64+
_logger.LogError("Unable to find step {StepId} in workflow definition", pointer.StepId);
6565
pointer.SleepUntil = _datetimeProvider.UtcNow.Add(_options.ErrorRetryInterval);
6666
wfResult.Errors.Add(new ExecutionError
6767
{
@@ -83,7 +83,7 @@ public async Task<WorkflowExecutorResult> Execute(WorkflowInstance workflow, Can
8383
}
8484
catch (Exception ex)
8585
{
86-
_logger.LogError(ex, "Workflow {0} raised error on step {1} Message: {2}", workflow.Id, pointer.StepId, ex.Message);
86+
_logger.LogError(ex, "Workflow {WorkflowId} raised error on step {StepId} Message: {Message}", workflow.Id, pointer.StepId, ex.Message);
8787
wfResult.Errors.Add(new ExecutionError
8888
{
8989
WorkflowId = workflow.Id,
@@ -158,14 +158,14 @@ private async Task ExecuteStep(WorkflowInstance workflow, WorkflowStep step, Exe
158158

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

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

166166
if (body == null)
167167
{
168-
_logger.LogError("Unable to construct step body {0}", step.BodyType.ToString());
168+
_logger.LogError("Unable to construct step body {BodyType}", step.BodyType.ToString());
169169
pointer.SleepUntil = _datetimeProvider.UtcNow.Add(_options.ErrorRetryInterval);
170170
wfResult.Errors.Add(new ExecutionError
171171
{
@@ -275,4 +275,4 @@ private async Task DetermineNextExecutionTime(WorkflowInstance workflow, Workflo
275275
});
276276
}
277277
}
278-
}
278+
}

0 commit comments

Comments
 (0)