Skip to content

Conversation

@ramonsmits
Copy link
Member

  • Log exceptions on the same line as log entry
  • Log level for critical errors changed from WARN to FATAL as critical errors indicate a broken state

Before:

2023-08-22 14:28:04.5672|87|Error|NServiceBus.Transport.AzureServiceBus.MessagePump|Failed to execute recoverability.
Azure.Messaging.ServiceBus.ServiceBusException: The lock supplied is invalid. Either the lock expired, or the message has already been removed from the queue, or was received by a different receiver instance. (MessageLockLost). For troubleshooting information, see https://aka.ms/azsdk/net/servicebus/exceptions/troubleshoot.
   at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver.ThrowLockLostException()
   at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver.<DisposeMessageAsync>d__45.MoveNext()

After:

2023-08-22 14:28:04.5672|87|Error|NServiceBus.Transport.AzureServiceBus.MessagePump|Failed to execute recoverability.|Azure.Messaging.ServiceBus.ServiceBusException: The lock supplied is invalid. Either the lock expired, or the message has already been removed from the queue, or was received by a different receiver instance. (MessageLockLost). For troubleshooting information, see https://aka.ms/azsdk/net/servicebus/exceptions/troubleshoot.
   at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver.ThrowLockLostException()
   at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver.<DisposeMessageAsync>d__45.MoveNext()

This way log parsing returns more useful results. Currently, the results look like the following making it impossible to distinguish lines:

image

@ramonsmits ramonsmits self-assigned this Aug 23, 2023
@ramonsmits ramonsmits marked this pull request as draft August 23, 2023 16:00
@ramonsmits ramonsmits marked this pull request as ready for review September 5, 2023 15:12
@ramonsmits ramonsmits closed this Sep 6, 2023
@ramonsmits ramonsmits reopened this Sep 6, 2023
@ramonsmits ramonsmits enabled auto-merge (squash) September 6, 2023 11:29
@ramonsmits ramonsmits added this to the 4.33.0 (v next) milestone Sep 6, 2023
@ramonsmits ramonsmits merged commit 1def17c into master Sep 6, 2023
@ramonsmits ramonsmits deleted the logging-improvements branch September 6, 2023 11:52
@ramonsmits ramonsmits modified the milestones: 4.33.0 (v next), 5.0.0 Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants