Thorbjørn Ravn Andersen wrote:

I have a scenario where I would like to use log4j to save intermediate XML-files for later debugging. We are using log4j 1.2.7, and it is cumbersome to upgrade.

I therefore need a configuration that saves exactly one log entry per log file, and names it with some unique name. I tried DailyRollingFileAppender which - with S in the DatePattern - in theory should give me a uniquely named file per entry, but where the program logic apparently is not prepared for millisecond resolution. RollingFileAppender is less attractive as it renames and deletes files and does not allow a timestamp in the name.
I have a feeling I may be using a wrong approach. for this. Any suggestions?


After hitting send, I realised I forgot to describe what happens. Both appenders log several entries in the same file, without rolling over. DailyROllingFileAppender with S in the pattern, and RolingFileAppender with a filesize of 1 and ImmediateFlush on. So my problem is to get log4j to check for rollover _every_time, and actually do it :)

Sorry for the multiple posting.

--
 Thorbjoern Ravn Andersen      "...plus...Tubular Bells!"



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



Reply via email to