-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[service-bus] Make logging consistent throughout Service Bus #10638
Comments
I am not completely sold on using |
@ramya-rao-a - I've updated them. Removing 'a' gave us some more room. What do you think of the newer names? |
looking good |
See #2845 for reference on log levels |
Convert logging to use the @azure/logger rather than the debug package. This sets us up for properly logging - format changes (and error logging) will come in a future PR. Partial fix for #10638
With #11058 we are now using |
Sounds good :) |
…11726) Convert most logging over to print a consistent prefix and use the same methods for reporting errors. For the most part I left things unchanged so the diff wasn't too outrageous. However, there are some changes from before: - Took a rough stab at having a few more client loggers rather than just shoving everything under `logger`. - I created a ServiceBusLogger interface so we can augment the client loggers with an additional method `logError`. This makes it simpler to make sure you log the format consistently and to your correct logger. (the standalone `logError` always assumed you were going to logger) - `ServiceBusLogger.logError` always logs the message along with the 'objectified' form of the error by appending ` : <error>` to each call. Fixes #10638
As part of #10578 we've started down the path of making the log prefix contain more information.
This makes it a bit easier to scan but also to parse since the link, connection and address fields are in the same spot for each log line.
This issue is to track the work to apply this same style across the entirety of service bus.
The format as it stands today:
[connection-id|<linktype>:linkname]
is:
sender
: senderbatching
: batching receiverstreaming
: streaming receivermgmt
: management linksession
: message sessionWe'll also want to take this opportunity to transfer over to using Azure loggers rather than directly using
debug
. This is described in this issue as well (for EventHubs): #9209, which is a similar issue for EventHubs andThe text was updated successfully, but these errors were encountered: