On Monday, 22 June 2015 10:02:06 UTC+1, √ wrote:
>
> Doing the filtering pre-substitution seems like a bug.
>

If you're suggesting that there is a bug in the filter, then that is not 
true: it's a well documented, incredibly useful, feature: 
http://logback.qos.ch/manual/filters.html#DuplicateMessageFilter

  "Note that in case of parameterized logging, only the raw message is 
taken into consideration."

The problem is in Akka's SLF4J because *everything* the user logs is being 
converted into `{}` with parameters, even if the user actually logged a 
fully generated String. This means it's impossible to use this (very useful 
filter) in a meaningful way with Akka and de-duplication of logging 
messages must be performed in the application tier (yuck!).

The only practical workaround I can see to fix this today in my codebase is 
to reimplement Slf4jLogger.scala... but suggestions welcome.

Incidentally, I don't see why you don't just create the log message in 
Slf4jLogger because at this point we're running in the log actor and not in 
the thread / actor that initiated the log message. If you really want to 
delay logging, can't you just ask SLF4J "is debugging enabled for this 
source/class?"?

Best regards,
Sam

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to