akka/akka-core

Log error message printed to stdout despite mute filter

オープン

#25,057 opened on 2018/05/07

 (4 件のコメント) (0 件のリアクション) (0 人の担当者)Scala (3,547 件のフォーク)batch import
1 - triagedhelp wantedt:testing

Repository metrics

Stars
 (13,277 個のスター)
PR merge metrics
 (平均マージ 8d 19h) (30d で 10 merged PRs)

説明

Using Akka version 2.5.11.

Have akka.loggers = ["akka.testkit.TestEventListener"] set in the application.conf and, before executing a test, do system.eventStream.publish(TestEvent.Mute(EventFilter.error())).

With this setup, I expect all calls to log.error to be muted. However, what I'm actually seeing is that calls to log.error(msg) are correctly muted, while calls to log.error(cause, msg) are not (!).

Below is the stacktrace for the log.error(cause, msg) call

at akka.event.Logging$StdOutLogger.print(Logging.scala:890)
	  at akka.event.Logging$StdOutLogger.print$(Logging.scala:889)
	  at akka.event.Logging$DefaultLogger.print(Logging.scala:1021)
	  at akka.testkit.TestEventListener$$anonfun$receive$1.applyOrElse(TestEventListener.scala:506)
	  at akka.actor.Actor.aroundReceive(Actor.scala:517)
	  at akka.actor.Actor.aroundReceive$(Actor.scala:515)
	  at akka.event.Logging$DefaultLogger.aroundReceive(Logging.scala:1021)
	  at akka.actor.ActorCell.receiveMessage(ActorCell.scala:590)
	  at akka.actor.ActorCell.invoke(ActorCell.scala:559)
	  at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
	  at akka.dispatch.Mailbox.run(Mailbox.scala:224)
	  at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
	  at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
	  at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
	  at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
	  at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

and this codepath is not hit when calling log.error(msg).

Let me know if you can't pinpoint the issue and I should have some time next week to create a full reproducible

コントリビューターガイド