Skip to content

Commit

Permalink
Log queue name
Browse files Browse the repository at this point in the history
  • Loading branch information
yaroslav-tykhonchuk committed Feb 19, 2024
1 parent 7aff96b commit 7c0ee11
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions AzureBatchQueue/TimerBatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ async Task Update()
{
var remaining = Remaining();
await batchQueue.UpdateMessage(msg.MessageId, remaining);
logger.LogWarning("Message {msgId} was not fully processed within a timeout ({FlushPeriod} sec). {remainingCount} items left not completed from {totalCount} total",
logger.LogWarning("Message {msgId} was not fully processed within a timeout ({FlushPeriod}) sec in queue {QueueName}. {remainingCount} items left not completed from {totalCount} total",
msg.MessageId,
FlushPeriod.TotalSeconds,
batchQueue.Name,
remaining.Length,
items.Items().Length);
}
Expand All @@ -113,9 +114,11 @@ async Task Quarantine()
var remaining = Remaining();
await batchQueue.QuarantineData(msg.MessageId, remaining);

logger.LogInformation("Message {msgId} was quarantined after {dequeueCount} unsuccessful attempts. With {remainingCount} unprocessed from {totalCount} total",
logger.LogInformation("Message {msgId} was quarantined after {dequeueCount} unsuccessful attempts in queue {QueueName}." +
" With {remainingCount} unprocessed from {totalCount} total",
msg.MessageId,
msg.Metadata.DequeueCount,
batchQueue.Name,
remaining,
items.Items().Length);
}
Expand Down

0 comments on commit 7c0ee11

Please sign in to comment.