logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorbjørn Ravn Andersen <nospam0...@c.dk>
Subject Re: Using log4j to log XML-files?
Date Tue, 18 Nov 2003 12:16:51 GMT
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: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message