关闭AKKA IO-TCP日志记录

时间:2017-07-12 10:13:36

标签: tcp io akka

我想关闭以下(生命周期?)事件的日志记录,哪个配置指令控制它?

DEBUG [akka://MyActorSystem/system/IO-TCP/selectors/$a/371] - started (akka.io.TcpOutgoingConnection@558309d8)
DEBUG [akka://MyActorSystem/system/IO-TCP/selectors/$a/371] - now watched by Actor[akka://MyActorSystem/system/IO-TCP/selectors/$a#
DEBUG [akka://MyActorSystem/system/IO-TCP/selectors/$a/371] - Attemptingconnection to [localhost/127.0.0.1:12002]
DEBUG [akka://MyActorSystem/system/IO-TCP/selectors/$a/371] - Connection established to [localhost/127.0.0.1:12002]
DEBUG [akka://MyActorSystem/system/IO-TCP/selectors/$a/371] - stopped

1 个答案:

答案 0 :(得分:1)

您可以使用application.conf中的以下设置禁用生命周期日志消息("已启动","已观看","停止") / p>

akka {
  actor {
    debug {
      # disable DEBUG logging of actor lifecycle changes
      lifecycle = off
    }
  }
}

如果您正在使用远程处理:

akka {
  remote {
    log-remote-lifecycle-events = off
  }
}

摘录中的TCP连接日志消息(设置为herehere)在调试级别进行了硬编码,与生命周期事件不同,无法禁用。要防止记录这些消息,请将全局日志记录级别设置为比调试更粗粒度的级别(这样做也可以防止记录生命周期事件,无论上述设置如何)。有关日志记录的更多信息可在官方documentation中找到。

相关问题