# Akka logging without logback

**URL:** <https://discuss.akka.io/t/akka-logging-without-logback/7058>\
**Category:** Actors\
**Created:** [August 20, 2020, 11:34pm UTC](https://discuss.akka.io/t/akka-logging-without-logback/7058 "2020-08-20T23:34:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jointy](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@jointy](https://discuss.akka.io/u/jointy)\
**Post date:** [August 20, 2020, 11:34pm UTC](https://discuss.akka.io/t/akka-logging-without-logback/7058/1 "2020-08-20T23:34:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![patriknw](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/patriknw/32/89_2.png) [@patriknw](https://discuss.akka.io/u/patriknw)\
**Post date:** [August 21, 2020, 2:22pm UTC](https://discuss.akka.io/t/akka-logging-without-logback/7058/2 "2020-08-21T14:22:08Z")

</div>

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.
