aspose file tools*
The moose likes Other Open Source Projects and the fly likes Header issue for DailyRollingFileAppender  when rolled over  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Header issue for DailyRollingFileAppender  when rolled over  " Watch "Header issue for DailyRollingFileAppender  when rolled over  " New topic
Author

Header issue for DailyRollingFileAppender when rolled over

Abhishek Mish
Greenhorn

Joined: Dec 21, 2007
Posts: 29
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
Abhishek Mish
Greenhorn

Joined: Dec 21, 2007
Posts: 29
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Header issue for DailyRollingFileAppender when rolled over