DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31458>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31458


[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[EMAIL PROTECTED]




------- Additional Comments From [EMAIL PROTECTED]  2005-04-08 11:40 -------
We are experiencing this issue too. I've looked at the sources of
DailyRollingFileAppender.java and I think this can easily be fixed by changing
the rollOver method. Instead of the following code:

  File target  = new File(scheduledFilename);
  if (target.exists()) {
    target.delete();
  }

  File file = new File(fileName);
  boolean result = file.renameTo(target);
  if(result) {
    LogLog.debug(fileName +" -> "+ scheduledFilename);
  } else {
    LogLog.error("Failed to rename ["+fileName+"] to ["+scheduledFilename+"].");
  }

The following code:

  File target  = new File(scheduledFilename);
  if (!target.exists()) {
    File file = new File(fileName);
    boolean result = file.renameTo(target);
    if(result) {
      LogLog.debug(fileName +" -> "+ scheduledFilename);
    } else {
      LogLog.error("Failed to rename ["+fileName+"] to 
["+scheduledFilename+"].");
    }
  }

Maybe behind an option so that the user can choose for the (old) delete
behaviour and the new behaviour.

Will this be incorporated in a future version of Log4J?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to