1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

Update Error Logs to Properly Log Exception (#3603)

This commit is contained in:
Justin Baur 2023-12-28 13:50:33 -05:00 committed by GitHub
parent be842c762c
commit de30749628
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,8 +70,8 @@ public class AzureQueueHostedService : IHostedService, IDisposable
}
catch (Exception e)
{
_logger.LogError("Error processing dequeued message: " +
$"{message.MessageId} x{message.DequeueCount}. {e.Message}", e);
_logger.LogError(e, "Error processing dequeued message: {MessageId} x{DequeueCount}.",
message.MessageId, message.DequeueCount);
if (message.DequeueCount > 2)
{
await _queueClient.DeleteMessageAsync(message.MessageId, message.PopReceipt);
@ -86,7 +86,7 @@ public class AzureQueueHostedService : IHostedService, IDisposable
}
catch (Exception e)
{
_logger.LogError("Error processing messages.", e);
_logger.LogError(e, "Error processing messages.");
}
}