Skip to content

Commit efb3b47

Browse files
Copilotswathipil
andcommitted
Replace connection string with Azure Identity credential auth in logging example
Co-authored-by: swathipil <[email protected]>
1 parent 35d2dc9 commit efb3b47

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sdk/servicebus/azure-servicebus/TROUBLESHOOTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ logger.addHandler(handler)
5757

5858
# Enable AMQP frame level trace
5959
from azure.servicebus import ServiceBusClient
60+
from azure.identity import DefaultAzureCredential
6061

61-
client = ServiceBusClient(connection_string, logging_enable=True)
62+
credential = DefaultAzureCredential()
63+
client = ServiceBusClient(fully_qualified_namespace, credential, logging_enable=True)
6264
```
6365

6466
See full Python SDK logging documentation with examples [here](https://learn.microsoft.com/azure/developer/python/azure-sdk-logging).

0 commit comments

Comments
 (0)