No problem, raised as https://github.com/akka/akka/issues/17801

On Monday, 22 June 2015 13:23:02 UTC+1, Patrik Nordwall wrote:
>
> ok
> Sam, please open an issue.
> /Patrik
>
> On Mon, Jun 22, 2015 at 1:57 PM, Roland Kuhn <[email protected] 
> <javascript:>> wrote:
>
>> Ah, it seems that I misunderstood: this filter is not part of the 
>> pre-filtering that is done before even sending to the logger actor. Then 
>> disregard my comment about saving some cycles, within the logger actor it 
>> is obviously too late for that anyway.
>>
>> Patrik, your comment brought back a dim recollection of using "{}" to 
>> safe-guard against "{}" occurring within the message itself, but I just 
>> checked the sources of SLF4J and that case does not (no longer?) lead to an 
>> error condition, so we can simply remove that first argument AFAICS.
>>
>> Regards,
>>
>> Roland
>>
>> 22 jun 2015 kl. 13:03 skrev Patrik Nordwall <[email protected] 
>> <javascript:>>:
>>
>> One problem could be if the string contains placeholders {}.
>>
>> I would guess that the reason why we used debug("{}", message) was to 
>> avoid the toString of the message if the level is not enabled. Checking the 
>> level as you suggest might be enough.
>>
>> When using LoggingAdapter we materialize it to a string at call site.
>>
>> /Patrik
>>
>> On Mon, Jun 22, 2015 at 12:40 PM, Sam Halliday <[email protected] 
>> <javascript:>> wrote:
>>
>>> On Monday, 22 June 2015 11:30:30 UTC+1, √ wrote:
>>>>
>>>> Why deduplicate non-logged events at all?
>>>>
>>>> Doing the substitution but not incurring the IO cost must be worth it?
>>>>
>>>>
>>> Turbo Filters are a well defined concept in Logback land: 
>>> http://logback.qos.ch/manual/filters.html#TurboFilter
>>>
>>> The only logic is to add a string to an LRUCache, so I don't believe 
>>> there is a great overhead here in the typical case.
>>>
>>> With my workaround, logger.debug isn't even called if the debugging is 
>>> not enabled for that class/source.
>>>
>>> Unfortunately, when logged through the LoggingAdapter, we lose the 
>>> ability to dedupe based on log template and it is instead performed on the 
>>> full String. I can live with that as a caveat.
>>>
>>>  
>>>
>>>> -- 
>>>> Cheers,
>>>> √
>>>> On 22 Jun 2015 11:09, "Roland Kuhn" <[email protected]> wrote:
>>>>
>>>>> It depends on what you want to achieve: not doing the substitution for 
>>>>> non-logged events is an explicit goal in our infrastructure.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Roland
>>>>>
>>>>> 22 jun 2015 kl. 11:02 skrev Viktor Klang <[email protected]>:
>>>>>
>>>>> Doing the filtering pre-substitution seems like a bug.
>>>>>
>>>>> -- 
>>>>> Cheers,
>>>>> √
>>>>> On 22 Jun 2015 01:54, "Sam Halliday" <[email protected]> wrote:
>>>>>
>>>>>> Patrik,
>>>>>>
>>>>>> Thanks for investigating! You saved me a few hours off my Monday as I
>>>>>> was going to go through this in detail and put together a minimal test
>>>>>> case :-)
>>>>>>
>>>>>> Unfortunately, your conclusion seems to be pretty damning. It might 
>>>>>> just
>>>>>> be this one turbofilter that is incompatible with akka, but its likely
>>>>>> there are more.
>>>>>>
>>>>>> Can you think of any workarounds, other that doing duplicate filtering
>>>>>> in the application tier? (eek!) I could investigate writing my own
>>>>>> turbofilter that handles the {} case... performance is not a major
>>>>>> concern here as the consequences of not duplicate filtering is more
>>>>>> far more significant than rendering log messages twice.
>>>>>>
>>>>>> 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 [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.
>>>>>>
>>>>>> Patrik Nordwall <[email protected]> writes:
>>>>>>
>>>>>> > On Sun, Jun 21, 2015 at 4:04 PM, Sam Halliday <[email protected]>
>>>>>>
>>>>>> > wrote:
>>>>>> >
>>>>>> >> Everything is DEBUG, and this is akka 2.3.11.
>>>>>> >>
>>>>>> >
>>>>>> > ok
>>>>>> >
>>>>>> > We log these (and all other things) with
>>>>>> > Logger(logClass, logSource).debug("{}", 
>>>>>> message.asInstanceOf[AnyRef])
>>>>>> >
>>>>>> > "{}" is the part that the duplicate filter will use to identify the 
>>>>>> log
>>>>>> > message, i.e. all log messages are identical :(
>>>>>> >
>>>>>> > This is not something that we have changed.
>>>>>> >
>>>>>> > /Patrik
>>>>>> >
>>>>>> >
>>>>>> >>
>>>>>> >>
>>>>>> >> On Sunday, 21 June 2015 15:03:48 UTC+1, Patrik Nordwall wrote:
>>>>>> >>>
>>>>>> >>> What akka.loglevel are you using?
>>>>>> >>>
>>>>>> >>> I guess that you see the changed behavior in 2.4-M1 compared to 
>>>>>> 2.3.11.
>>>>>> >>>
>>>>>> >>> In 2.4 we have added a check in LoggingReceive that it will only 
>>>>>> be
>>>>>> >>> active if the loglevel is DEBUG.
>>>>>> >>>
>>>>>> >>> if (context.system.eventStream.logLevel >= Logging.DebugLevel) {
>>>>>> >>>
>>>>>> >>> /Patrik
>>>>>> >>>
>>>>>> >>>
>>>>>> >>> On Thu, Jun 18, 2015 at 11:01 PM, Sam Halliday <
>>>>>> [email protected]>
>>>>>> >>> wrote:
>>>>>> >>>
>>>>>> >>>> Hi all,
>>>>>> >>>>
>>>>>> >>>> I'm seeing something very weird.
>>>>>> >>>>
>>>>>> >>>> When I enable the logback turboFilter DuplicateMessageFilter:
>>>>>> >>>>
>>>>>> >>>>   
>>>>>> http://logback.qos.ch/manual/filters.html#DuplicateMessageFilter
>>>>>> >>>>
>>>>>> >>>>
>>>>>> >>>> 
>>>>>> https://github.com/qos-ch/logback/blob/master/logback-classic/src/main/java/ch/qos/logback/classic/turbo/DuplicateMessageFilter.java
>>>>>> >>>>
>>>>>> >>>> all my LoggingReceive messages go silent.
>>>>>> >>>>
>>>>>> >>>> Uncommenting the one line in my config that enables the filter 
>>>>>> is the
>>>>>> >>>> only change and introduces the regression. Latest scala, latest 
>>>>>> akka,
>>>>>> >>>> latest logback.
>>>>>> >>>>
>>>>>> >>>> I can workaround it at the moment, but this is extremely 
>>>>>> concerning
>>>>>> >>>> because I have used the duplicate filter in chatty production 
>>>>>> systems in
>>>>>> >>>> the past and to see an incompatibility between two stable 
>>>>>> libraries is
>>>>>> >>>> never good.
>>>>>> >>>>
>>>>>> >>>> Turning on logback debug (when it reads its own config) is 
>>>>>> looking good,
>>>>>> >>>> no problems reported.
>>>>>> >>>>
>>>>>> >>>> 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 [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.
>>>>>> >>>>
>>>>>> >>>
>>>>>> >>>
>>>>>> >>>
>>>>>> >>> --
>>>>>> >>>
>>>>>> >>> Patrik Nordwall
>>>>>> >>> Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
>>>>>> >>> Twitter: @patriknw
>>>>>> >>>
>>>>>> >>>   --
>>>>>> >> >>>>>>>>>> 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.
>>>>>> >>
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> > --
>>>>>> >
>>>>>> > Patrik Nordwall
>>>>>> > Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
>>>>>> > Twitter: @patriknw
>>>>>> >
>>>>>> > --
>>>>>> >>>>>>>>>>>      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 a topic in 
>>>>>> the Google Groups "Akka User List" group.
>>>>>> > To unsubscribe from this topic, visit 
>>>>>> https://groups.google.com/d/topic/akka-user/YVri58taWsM/unsubscribe.
>>>>>> > To unsubscribe from this group and all its topics, 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.
>>>>>>
>>>>>> --
>>>>>> 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 [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.
>>>>>>
>>>>>>
>>>>> -- 
>>>>> >>>>>>>>>> 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.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> *Dr. Roland Kuhn*
>>>>> *Akka Tech Lead*
>>>>> Typesafe <http://typesafe.com/> – Reactive apps on the JVM.
>>>>> twitter: @rolandkuhn
>>>>> <http://twitter.com/#!/rolandkuhn>
>>>>>
>>>>>
>>>>> -- 
>>>>> >>>>>>>>>> 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.
>>>>>
>>>>
>>
>>
>> -- 
>>
>> Patrik Nordwall
>> Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
>> Twitter: @patriknw
>>
>>
>> -- 
>> >>>>>>>>>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>>
>> *Dr. Roland Kuhn*
>> *Akka Tech Lead*
>> Typesafe <http://typesafe.com/> – Reactive apps on the JVM.
>> twitter: @rolandkuhn
>> <http://twitter.com/#!/rolandkuhn>
>>  
>>  -- 
>> >>>>>>>>>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>>
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
>
> Patrik Nordwall
> Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
> Twitter: @patriknw
>
> 

-- 
>>>>>>>>>>      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.

Reply via email to