I am looking at the treatment of the prudent mode in FileAppender.java and I am 
seeing a potential defect.
This implementation performs a file lock followed by lock synchronization.  
This ordering seems to be reversed.
The behavior of concurrent file lock requests to the same file within a JVM is 
undefined.  You need to do the
synchronization first to avoid the undefined behavior.

In fact, to workaround for the possibility of multiple loggers targeting the 
same file, the lock object should be the interned string of
the canonical path.  That seems to be the requirements for our use-case.

Regards,
Thomas

____________________________________________________________
Publish your photos in seconds for FREE
TRY IM TOOLPACK at http://www.imtoolpack.com/default.aspx?rc=if4
_______________________________________________
logback-dev mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-dev

Reply via email to