On Nov 22, 2007, at 12:02 PM, sed wrote:

Hi,

Has log4j file append that does not lock file? So I can delete my to
that log4j is writing logs and log4j will create file again.


I do not believe it would be possible to do so in platform independent manner. On Unix's, I believe that "deleting" the file while log4j was logging would not cause any interruption, only the directory entry would be changed immediately and the file would be deleted when closed by log4j. On WIndows, you'd either not be able to delete the file, but if you were able to delete the file then subsequent writes would fail and you could potentially recover as you suggest, but there is no mechanism to specify the locking behavior.

You might consider using ExternallyRolledFileAppender which will rename the current file when it receives a signal.

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

Reply via email to