gpt4 book ai didi

logging - 如何在 Akka.NET 中禁用集群心跳日志记录

转载 作者:行者123 更新时间:2023-12-02 20:47:56 25 4
gpt4 key购买 nike

当尝试对 Akka.NET 中的集群设置进行故障排除时,集群心跳消息会填满日志。

[DEBUG][8/9/2016 6:04:32 PM][Thread 0011][[akka://mysystem/system/cluster/core/daemon#1680718572]] [Initialized] Received Akka.Cluster.GossipStatus

有没有办法有选择地阻止此日志事件 appears to be possible with Akka for JVM

最佳答案

我也遇到了同样的问题。日志中的八卦消息太多,我想阻止这种情况发生。

这是一个解决方案。

https://github.com/akkadotnet/akka.net/blob/v1.1.2/src/core/Akka.Cluster/Configuration/Cluster.conf#L77

因此,为了避免像这样的 GossipStatus 消息污染日志(类似于您的示例):

[DEBUG][2016-12-26 1:48:36 PM][Thread 0004][[akka://mysystem/system/cluster/core/daemon#1458732427]] [Initialized] Received Akka.Cluster.GossipStatus

您只需关闭以下选项:

cluster {
log-info = off
}

同时,如果您像这样打开了远程选项:

remote {
log-received-messages = on
}

然后您仍然会记录一些集群八卦消息(如@Aaronontheweb提到的),但这些消息是不同的。例如与此比较:

[DEBUG][2016-12-26 1:41:03 PM][Thread 0008][[akka://mysystem/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2Fmysystem%40127.0.0.1%3A4053-1/endpointWriter#1021888826]] received local message [RemoteMessage: Akka.Cluster.ClusterHeartbeatSender+HeartbeatRsp to [akka://mysystem/system/cluster/core/daemon/heartbeatSender#647951916]<+akka://mysystem/system/cluster/core/daemon/heartbeatSender from [akka.tcp://mysystem@127.0.0.1:4053/system/cluster/heartbeatReceiver#497245242]]
[DEBUG][2016-12-26 1:41:04 PM][Thread 0010][[akka://mysystem/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2Fmysystem%40127.0.0.1%3A4053-1/endpointWriter#1021888826]] received local message [RemoteMessage: ActorSelectionMessage - Message: Akka.Cluster.GossipStatus - WildCartFanOut: False - Elements: system/cluster/core/daemon to [akka://mysystem/]<+akka://mysystem/ from [akka.tcp://mysystem@127.0.0.1:4053/system/cluster/core/daemon#1365688409]]
[DEBUG][2016-12-26 1:41:04 PM][Thread 0009][[akka://mysystem/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2Fmysystem%40127.0.0.1%3A4053-1/endpointWriter#1021888826]] received local message [RemoteMessage: ActorSelectionMessage - Message: Akka.Cluster.ClusterHeartbeatSender+Heartbeat - WildCartFanOut: False - Elements: system/cluster/heartbeatReceiver to [akka://mysystem/]<+akka://mysystem/ from [akka.tcp://mysystem@127.0.0.1:4053/system/cluster/core/daemon/heartbeatSender#2069081679]]

关于logging - 如何在 Akka.NET 中禁用集群心跳日志记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38857644/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com