Hi,

You could try combining the CSV layout and the rolling file appender:

https://logging.apache.org/log4j/log4j-2.5/manual/layouts.html#CSVLayouts 
<https://logging.apache.org/log4j/log4j-2.5/manual/layouts.html#CSVLayouts>
https://logging.apache.org/log4j/log4j-2.5/manual/appenders.html#RollingFileAppender
 
<https://logging.apache.org/log4j/log4j-2.5/manual/appenders.html#RollingFileAppender>
 

Cheers,
Jochen

> Am 22.04.2021 um 21:51 schrieb 'Abhijit Bhadra' via dropwizard-user 
> <[email protected]>:
> 
> I have semi-colon separated values logged to a csv file using log4j. Now i 
> wanted to write a header in first line [only once, everyday]. How this can be 
> done?
> 
> Example
> message id, file name, start time, end time, status
> MSGID1000;SAMPLE.TXT;01:05:55;07:08:44;OK
> MSGID1000;SAMPLE.TXT;01:05:55;07:08:44;NOK

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dropwizard-user/D6162554-5B1E-4D56-90C1-0658ADB2FFDD%40schalanda.name.

Reply via email to