Quantcast
Channel: Akka Libraries - Discussion Forum for Akka technologies
Viewing all articles
Browse latest Browse all 1362

Akka Actor logging of line numbers

$
0
0

We are using Akka 2.4.19 with Scala 2.12.12. If I configure logback to log line numbers I only see:

Slf4jLogger.scala:83

which is a class in the akka library. How do I get the real location of the issued log statement or what am I doing wrong?

See also https://stackoverflow.com/questions/64355775/how-to-log-filename-and-linenumber-in-akka-classic-actor

I do use the following pattern:

<pattern>%d{HH:mm:ss.SSS} %-5level [%thread] [%logger] [%F:%L] [%mdc{akkaSource:-}] %msg [%mdc]%n</pattern>

Patrik answered:
"…Short answer is that Akka’s logging is asynchronous so Slf4jLogger is expected. You can create your own slf4j Logger with the LoggerFactory and then you will see your own source code. "

I am not sure if I understand what and why to do. Logback is a backend for Slf4j. Do we have to switch to Slf4j Impl now? And why?

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 1362

Trending Articles