Skip to content

Commit 766e57a

Browse files
committed
add queue type to JobHosting logging
1 parent 9df4b78 commit 766e57a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Microsoft.Health.TaskManagement/JobHosting.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public async Task ExecuteAsync(byte queueType, short runningJobCount, string wor
6161
{
6262
try
6363
{
64-
_logger.LogInformation("Dequeuing next job.");
64+
_logger.LogInformation("Dequeuing next job for {QueueType}.", queueType);
6565

6666
if (checkTimeoutJobStopwatch.Elapsed.TotalSeconds > 600)
6767
{
@@ -73,7 +73,7 @@ public async Task ExecuteAsync(byte queueType, short runningJobCount, string wor
7373
}
7474
catch (Exception ex)
7575
{
76-
_logger.LogError(ex, "Failed to dequeue new job.");
76+
_logger.LogError(ex, "Failed to dequeue new job for {QueueType}.", queueType);
7777
}
7878
}
7979

@@ -102,12 +102,12 @@ public async Task ExecuteAsync(byte queueType, short runningJobCount, string wor
102102
{
103103
try
104104
{
105-
_logger.LogInformation("Empty queue. Delaying until next iteration.");
105+
_logger.LogInformation("Empty queue {QueueType}. Delaying until next iteration.", queueType);
106106
await Task.Delay(TimeSpan.FromSeconds(PollingFrequencyInSeconds), cancellationTokenSource.Token);
107107
}
108108
catch (TaskCanceledException)
109109
{
110-
_logger.LogInformation("Queue is stopping, worker is shutting down.");
110+
_logger.LogInformation("Queue {QueueType} is stopping, worker is shutting down.", queueType);
111111
}
112112
}
113113
}

0 commit comments

Comments
 (0)