You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2008/08/03 00:02:25 UTC

DO NOT REPLY [Bug 33278] NPE thrown durring daily log file rollover

https://issues.apache.org/bugzilla/show_bug.cgi?id=33278





--- Comment #4 from Thorbjørn Ravn Andersen <th...@gmail.com>  2008-08-02 15:02:25 PST ---
So what happens is that two threads try to log, get in the subappend() block
and one starts changing the file logged to, gets interrupted and the other one
gets control with the file system in an inconsistent state?

The solution to make subappender synchronized sounds reasonable and the
overhead should be negletible.

When looking at the code, I wonder if the information in the files without
synchronization occasionally gets jumbled.  There is no effort to ensure that
the whole log chunk is written in one piece.

I suggest that subAppend() is made syncrhonized in WriteAppender,
DailyRollingFileAppender and RollingFileAppender.

Comments?


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org