Akka Logging "vs" scala-logging

Hello Hakkers,

I’m working on a program where Akka Logging is used but scala-logging is used as well.

Because I want to simplify this program, I’m thinking that using both is maybe not the best idea.

Because Akka Logging is only usable in Akka Actors, do you think that replace it with scala-logging is ok ?
Can this change introduce some problems or bugs ?

Can I use the scala-logging LazyLogging and/or the StrictLogging traits with Actors ?


1 Like

Hi Jules,

you can use whatever logging you like in actors, the important part is to make sure the the logger is not blocking on writing the log entry to disk in the actor (which is what the built in logger avoids), scala-logging is backed by slf4j which in turn will have a concrete logger backend that you need to configure with an async appender of some kind. Logback for example has the AsyncAppender.

We don’t use macros in Akka because that would make it hard or impossible to keep binary compatibility, this is why we can’t do the same tricks as scala-logging does.


Hi Johan,

Thanks for the detailed answer.
I use the AsyncAppender so it’s safe to use scala-logging in my case.