Forums Register Login

Header issue for DailyRollingFileAppender when rolled over

+Pie Number of slices to send: Send
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.
If at server startup if header information are looged to csv file,when log file is rolled over the header information are not written to csv file.

If there is any way so that the header information is written to csv file everytime when the file is rolled over.

Rgds,
Abhishek
+Pie Number of slices to send: Send
Hi All,
I found that there is already bug reported for log4j.
34651|New|Enh|2005-04-27|allow for a header on top of every rolled file.

I am not sure in which version this bug was reported and whether it is fixed in other releases.
Also is it possible if custom Layout class override the getHeader method,but still the problem is i dont find any method like setHeader.

suggest.
Thanks
Abhishek
After some pecan pie, you might want to cleanse your palatte with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1075 times.
Similar Threads
Daily log appender query
DailyRollingFileAppender
server.log file
Appending Date in the name of created LOG4J file
DailyRollingFileAppender problem
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 09:19:31.