logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bburtin.29540...@bloglines.com
Subject Header issue with DailyRollingFileAppender
Date Wed, 03 May 2006 21:52:06 GMT
I'm using DailyRollingFileAppender in log4j 1.2 to write CSV files.  The first
line in the CSV file contains the names of the columns and each subsequent
line contains data for each column.  So I need the header logged only when
a new log file is created or rolled over.  I tried using Layout.setHeader()
but got headers logged in the middle of a CSV file when my application starts

I did some mailing list searches on this issue and came to the conclusion
that in 1.2 I'd have to write my own version of DailyRollingFileAppender with
an alternate implementation of rollover().  Does anyone have a cleaner approach?

What about log4j 1.3?  Once I upgrade, would I do something like use RolloverDescription
with a synchronous action to log the header?

Thanks in advance,


To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message