0

我正在使用以下库通过 Java 应用程序连接到我的 Azure 服务总线

<dependency>
    <groupId>com.azure</groupId>
    <artifactId>azure-messaging-servicebus</artifactId>
    <version>7.2.1</version>
</dependency>

我能够成功连接到服务总线。但是我的控制台充满了我想关闭的 Azure 消息服务总线日志

我无法删除项目中的记录器实现,因为我需要其他模块

以下是我收到的示例日志

DEBUG   2021-05-31 10:55:30.184 [reactor.] (): Using Slf4j logging framework
DEBUG   2021-05-31 10:55:30.796 [com.azur] (): connectionId[[id, UNINITIALIZED]]: State {}
INFO    2021-05-31 10:55:30.801 [com.azur] (): namespace[[, host]] entityPath[{}]: Setting next AMQP channel.
INFO    2021-05-31 10:55:30.801 [com.azur] (): namespace[[, host, 0]] entityPath[{}]: Next AMQP channel received, updating {} current subscribers
DEBUG   2021-05-31 10:55:30.809 [com.azur] (): connectionId[[id, UNINITIALIZED]]: State {}
INFO    2021-05-31 10:55:30.810 [com.azur] (): # of open clients with shared connection: [1]
Starting the Service Bus processorINFO    2021-05-31 10:55:30.834 [com.azur] (): [Topic name , Subscription name]: Creating consumer for link '{}'
INFO    2021-05-31 10:55:30.839 [com.azur] (): Requesting a new AmqpReceiveLink from upstream.
INFO    2021-05-31 10:55:30.853 [com.azur] (): connectionId[[id, host, 5671]]: Creating and starting connection to {}:{}

如何仅关闭 Azure 服务总线日志?

4

1 回答 1

0

您是否尝试过https://github.com/Azure/azure-service-bus-java/issues/255的以下建议?

Logger.getLogger("com.microsoft.azure.servicebus").setLevel(Level.OFF);

于 2021-05-31T14:38:33.123 回答