Logs corresponding to the methods under ServiceBusAdministrationClient are shown as below.
Example: The initial log inside the createQueue method.
azure:service-bus:administration:verbose Performing management operation - createQueue() for "partitioned-queue" with options: [object Object]
Update the log statement to show better info for the options instead of [object Object].(Maybe use JSON.stringify)
PRs are welcome to add this feature.
Code Pointers:
rush buildsdk/servicebus/service-bus folder in your editor/IDE, find the ServiceBusAdministrationClient class and get startedAZURE_LOG_LEVEL env variable to one of these values@HarshaNalluru and @ramya-rao-a I think one option is to use '%j' format specifier as logger is using nodejs util.format method. Should we use this approach?
logger.verbose(
`Performing management operation - createQueue() for "${queueName}" with options: %j`,
options
);
Also, is there a way to verify these logging statement output on my local?
@mohsin-mehmood, it should be fine if it works.
.env file in the servicebus/service-bus folder with a connection string such as SERVICEBUS_CONNECTION_STRING=Endpoint=endpoint/;SharedAccessKeyName=key;SharedAccessKey=key - sample.envOnce you have the SERVICEBUS_CONNECTION_STRING in the .env file and you do the changes to the src folder, you can run a test
atomManagement.spec.tsit.only for any test that would invoke the createQueue method for example or add your ownDEBUG=azure* in the cmd line or terminal - Referencerushx test:node or rushx test:browser (Assuming you have the rush setup)If you want to verify through a sample instead, follow below.
src folder, run rushx pack to generate the package (Assuming you have the rush setup)azure-service-bus-7.0.0-preview.8.tgznpm init), do npm install azure-service-bus-7.0.0-preview.8.tgz(make sure the path is valid)DEBUG=azure* in the cmd line or terminal - ReferenceadministrationClient.ts and run it with ts-node.This might seem like a lot of setup, let me know if you have questions or if you're stuck at any point 馃檪
Done with #12187
Thanks @mohsin-mehmood!