如何根据要求在所有项目中使用 NServiceBus 设置性能计数器

How to setup Performance Counters with NServiceBus in all the projects as per requirement

我正在尝试 运行 NServiceBus 提供的可下载 .Net(版本 4.6.1)项目 link

https://docs.particular.net/samples/step-by-step/

当我尝试 运行 应用程序时,出现以下错误...

NServiceBus.PerformanceCounterHelper NServiceBus performance counter for '# of msgs pulled from the input queue /sec' is not set up correctly. To rectify this problem, consult the NServiceBus performance counters documentation.

如何 运行 代码而不从其中的 4 个项目中的每一个获取 INFO 消息?

要解决性能计数器的问题,请查看 the documentation 以了解如何安装计数器,如果解决了您的问题,请告诉我。

要更改日志记录级别,请按照 the documentation 中的说明进行操作。对于 NServiceBus 版本 6,您只需在 ClientServerSubscriber 项目中的主要方法的开头添加以下代码:

var defaultFactory = LogManager.Use<DefaultFactory>();
defaultFactory.Level(LogLevel.Error);