You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by bb...@bloglines.com on 2006/05/03 23:52:06 UTC

Header issue with DailyRollingFileAppender

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
up.

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,

Boris

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