You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/servicebus/azure-servicebus/README.md
+39-8Lines changed: 39 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -388,19 +388,22 @@ It would also manifest when trying to take action (such as completing a message)
388
388
### Logging
389
389
390
390
- Enable `azure.servicebus` logger to collect traces from the library.
391
-
- Enable `uamqp` logger to collect traces from the underlying uAMQP library.
392
391
- Enable AMQP frame level trace by setting `logging_enable=True` when creating the client.
393
-
- There may be cases where you consider the `uamqp` logging to be too verbose. To suppress unnecessary logging, add the following snippet to the top of your code:
392
+
394
393
```python
395
394
import logging
395
+
import sys
396
396
397
-
# The logging levels below may need to be changed based on the logging that you want to suppress.
Note: The `message` attribute on `ServiceBusMessage`/`ServiceBusMessageBatch`/`ServiceBusReceivedMessage`, which previously exposed the `uamqp.Message`, has been deprecated.
507
510
The "Legacy" objects returned by `message` attribute have been introduced to help facilitate the transition.
508
511
512
+
To enable the `uamqp` logger to collect traces from the underlying uAMQP library:
There may be cases where you consider the `uamqp` logging to be too verbose. To suppress unnecessary logging, add the following snippet to the top of your code:
528
+
```python
529
+
import logging
530
+
531
+
# The logging levels below may need to be changed based on the logging that you want to suppress.
532
+
uamqp_logger = logging.getLogger('uamqp')
533
+
uamqp_logger.setLevel(logging.ERROR)
534
+
535
+
# or even further fine-grained control, suppressing the warnings in uamqp.connection module
0 commit comments