On Feb 13, 2010, at 3:58 PM, Ceki Gülcü wrote: > > Isn't the write method in PrudentWriter (see [1]) a copy-and-paste of code > safeWrite() method in logback's FileAppender (see [2])? > > [1] > http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/PrudentWriter.java?revision=909868&view=markup&pathrev=909918 > [2] > http://github.com/ceki/logback/blob/master/logback-core/src/main/java/ch/qos/logback/core/FileAppender.java >
http://issues.apache.org/bugzilla/show_bug.cgi?id=48704 The process that I followed was to examine to the logback code to determine what prudent mode was, which I then described as part of the bug report and then implemented from the description. The fragments are similar since there aren't that many ways to get a lock on a channel, reposition the channel to the end of the file, write a string, and release a lock. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
