[logback-user] TurboFilter thread-safety?

Ceki Gülcü ceki at qos.ch
Mon Feb 21 16:28:54 CET 2011


Hello César,

Logback does not use any synchronization when invoking turbo filters.
TurboFilters needs to ensure they are thread safe on their own. The fact 
that DuplicateMessageFilter does not synchronize on LinkedHashMap is 
probably a bug. Could you please enter a bug report for the issue you 
just discovered?


On 21/02/2011 3:28 PM, César Álvarez Núñez wrote:
> Hi all,
>
> I would like to known if TurboFilter is multithread-safe or not since
> the manual does not say anything about it.
>
> Reviewing
> https://github.com/ceki/logback/blob/master/logback-classic/src/main/java/ch/qos/logback/classic/turbo/DuplicateMessageFilter.java
> I have seen that a it makes use of a LinkedHashMap
> (http://download.oracle.com/javase/6/docs/api/java/util/LinkedHashMap.html)
> which requires synchronization in case of multithread access.
>
> BR,
> /César.
>



More information about the Logback-user mailing list