Akka logging without logback

Due to constraints to use Scala 2.11 (for Spark 2.3) I’m using Akka 2.5.21 with typed actors. But I’m struggling to get logging to work, as I’m using log4j as backend with slf4j.
My application.conf is set as:
akka {
loggers = [“akka.event.slf4j.Slf4jLogger”]
loglevel = “INFO”
logging-filter = “akka.event.slf4j.Slf4jLoggingFilter”
}

But any logging from the actors shows up as:

  • the log is created using ActorContext<T>.getLog()
  • yyyy-MM-dd HH:mm:ss:SSS [myapp-akka.actor.default-dispatcher-1] [INFO] [org.slf4j.helpers.MarkerIgnoringBase] my info log line

It is unable to properly show the actor name or class in this case.

Can someone please point to me what I might be missing ?

Thank you.

Akka is only using standard SL4J API, apart from the LoggingTestKit that is only for Logback (but that is only for testing). The logger name (class name or similar) should be a very standard property. Some things are placed in MDC and I don’t know if log4j has support for that.