From e27c2743df242b3a85bd8a8e82bc821c50658ef7 Mon Sep 17 00:00:00 2001 From: Nicolaj Hartmann Date: Mon, 21 Oct 2024 11:07:01 +0200 Subject: [PATCH] Add structured logging in hangfire --- Source/EventFlow.Hangfire/Integration/HangfireJobScheduler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/EventFlow.Hangfire/Integration/HangfireJobScheduler.cs b/Source/EventFlow.Hangfire/Integration/HangfireJobScheduler.cs index 7b34427e6..6f375027a 100644 --- a/Source/EventFlow.Hangfire/Integration/HangfireJobScheduler.cs +++ b/Source/EventFlow.Hangfire/Integration/HangfireJobScheduler.cs @@ -98,7 +98,7 @@ private Task ScheduleAsync( var id = schedule(jobDefinition, json); - _logger.LogInformation($"Scheduled job '{id}' with name '{jobDefinition.Name}' in Hangfire"); + _logger.LogInformation("Scheduled job {JobId} with name {JobDefinitionName} in Hangfire", id, jobDefinition.Name); return Task.FromResult(new HangfireJobId(id)); }