Akka群集:如何禁用ClusterHeartbeat日志 [英] Akka cluster: how to disable ClusterHeartbeat log

查看:89
本文介绍了Akka群集:如何禁用ClusterHeartbeat日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在玩Akka群集,并且设置了2个节点。正如预期的那样,两个节点相互聊天以表示它们通过 heartbeat 仍然存在。所以每秒钟我的日志中都会有一个这样的字符串

I'm playing a bit with an Akka cluster and I had a setup with 2 nodes. As expected, the two nodes chat each other to say that they are alive through the heartbeat. So every second I have a string like this in my log

[debug] 15:42:10.683-a.c.ClusterHeartbeatSender: Cluster Node  
[akka.tcp://application@127.0.0.1:52650] - 
Heartbeat to   [akka.tcp://application@127.0.0.1:2551]

但是我不希望看到此诊断信息,因为它隐藏了我的调试信息,并且我很确定集群可以正常工作我的机器上有两个JVM。我尝试使用

However I wouldn't like to see this diagnostic, since it hides my debug information and I'm quite sure that the cluster works since is made up of two JVMs on my machine. I tried to change the configuration with

akka.cluster.log-info = off

,但似乎不适用于这种情况。如何从日志中隐藏该信息?

but it does not seem to work for this case. How can hide this info from logs?

推荐答案

我使用关于更改特定类或包的日志级别的另一个问题。我留下问题和答案,以供将来的读者寻找快速的解决方案。就我而言,我添加了这一行

I solved using this other question about changing log level for a specific class or package. I leave question and answer for future reader looking for quick solution. In my case I added this row

<logger name="akka.cluster.ClusterHeartbeatSender" level="OFF"/>

logger.xml 文件的根

这篇关于Akka群集:如何禁用ClusterHeartbeat日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆