Hello,
I have my akka-slf4j based logging working just fine, except for one
aspect. In Logback you can define a PatternLayout that includes the %file
and %line substitutions, like this:
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%X{akkaTimestamp} %-5level
[%X{sourceThread}:%logger{30}:%X{akkaSource}:%file:%line]%n
%msg%n%rootException</pattern>
</encoder>
</appender>
The problem is that when this pattern gets logged, all I get for %file and
%line is "Slf4jLogger.scala:77", like this:
14:36:56.566UTC DEBUG
[RxMongo-akka.actor.default-dispatcher-5:akka.io.SelectionHandler:akka://RxMongo/system/IO-TCP/selectors/$a/0:Slf4jLogger.scala:77]
> null
>
I understand the reason for this being akka's asynchronous logging and the
point at which it actually gets logged is somewhere inside Akka's
LoggingAdapter.
So, my question is: has anyone found a workaround to this so the source file
and line number can be placed into the log? This would be a win for debugging.
TIA,
Reid
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.