[英]Azure Service Bus logging_enable=True
def send_single_message(sender):
# create a Service Bus message
message = ServiceBusMessage("Single Message")
# send the message to the topic
sender.send_messages(message)
print("Sent a single message")
create a Service Bus client using the connection string使用连接字符串创建服务总线客户端
servicebus_client = ServiceBusClient.from_connection_string(conn_str=CONNECTION_STR, logging_enable=True)
with servicebus_client:
# get a Topic Sender object to send messages to the topic
sender = servicebus_client.get_topic_sender(topic_name=TOPIC_NAME)
with sender:
# send one message
send_single_message(sender)
print("Done sending messages")
print("-----------------------")
What does logging_enable=True mean here? logging_enable=True 在这里是什么意思?
Thanks @Peter Bons, According Microsoft-Document it says ,谢谢@Peter Bons,根据微软文档,它说,
Whether to output network trace logs to the logger.
是否将网络跟踪日志输出到记录器。 Default is False .
默认为False 。
You can find the logs in logs
in Monitoring section as below:您可以在监控部分的
logs
中找到日志,如下所示:
You need to try kql query to get the logs: Example Kql Query:您需要尝试使用 kql 查询来获取日志:示例 Kql 查询:
References:参考:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.