有没有办法关闭 Akka 的调试输出?
在使用 Akka 时,我实现了一个简单的命令行应用程序。
但是 Akka 也会将语句打印到命令行,例如:
[GENERIC] [27.10.11 22:57] [RemoteClientStarted(akka.remote.netty.NettyRemoteSupport@b07f45d,/127.0.0.1:3000)]
[GENERIC] [27.10.11 22:57] [RemoteClientConnected(akka.remote.netty.NettyRemoteSupport@b07f45d,/127.0.0.1:3000)]
[GENERIC] [27.10.11 22:57] [RemoteClientShutdown(akka.remote.netty.NettyRemoteSupport@b07f45d,/127.0.0.1:3000)]
[GENERIC] [27.10.11 22:57] [RemoteClientDisconnected(akka.remote.netty.NettyRemoteSupport@b07f45d,/127.0.0.1:3000)]
有没有办法禁用此调试输出(或将其重定向到其他地方)?
While working with Akka, I have implemented a simple command line app.
But Akka also prints statements to the command line like:
[GENERIC] [27.10.11 22:57] [RemoteClientStarted(akka.remote.netty.NettyRemoteSupport@b07f45d,/127.0.0.1:3000)]
[GENERIC] [27.10.11 22:57] [RemoteClientConnected(akka.remote.netty.NettyRemoteSupport@b07f45d,/127.0.0.1:3000)]
[GENERIC] [27.10.11 22:57] [RemoteClientShutdown(akka.remote.netty.NettyRemoteSupport@b07f45d,/127.0.0.1:3000)]
[GENERIC] [27.10.11 22:57] [RemoteClientDisconnected(akka.remote.netty.NettyRemoteSupport@b07f45d,/127.0.0.1:3000)]
Is there a way to disable this debugging output (or redirect it to somewhere else)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许文档可以提供帮助:
EventHandler
Perhaps the docs can be of assistance:
EventHandler
做了一些事情来隐藏 [GENERIC] 日志标签。不确定是否需要所有这些,但它似乎有效。
将以下内容添加到我的
akka.conf
确保您正在更改正确的 akka.conf,您可能指定了 AKKA_HOME,或者您可能错误地将 akka.conf 放到了类路径中。
还在我的
logback.xml
底部进行了以下更改,您的
logback.xml
应该位于您的akka.conf
旁边Did a few things to hide the [GENERIC] log tags. Not sure if all of this is needed, but it seems to work.
Added the following to my
akka.conf
Make sure you are changing the right akka.conf, you may have an AKKA_HOME specified or you may have dropped an akka.conf onto your classpath by mistake.
Also made the following changes at the bottom of my
logback.xml
Your
logback.xml
should live right next to yourakka.conf