Inserting Header Text in Log file

34 views
Skip to first unread message

Abhijit Bhadra

unread,
Apr 22, 2021, 3:51:59 PM4/22/21
to dropwizard-user
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

Jochen Schalanda

unread,
Apr 23, 2021, 2:47:52 AM4/23/21
to dropwizard-user

Abhijit Bhadra

unread,
Apr 23, 2021, 4:34:57 AM4/23/21
to dropwiz...@googlegroups.com
Thanks Jochen

I am new to dropwizard framework , can I directly use CsvParameterLayout in the config.yml file of the logger configuration ?
thanks,
Abhijit

--
You received this message because you are subscribed to a topic in the Google Groups "dropwizard-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dropwizard-user/bhZbGHMVCEY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dropwizard-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dropwizard-user/D6162554-5B1E-4D56-90C1-0658ADB2FFDD%40schalanda.name.

This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.

Jochen Schalanda

unread,
Apr 23, 2021, 4:42:23 PM4/23/21
to dropwizard-user
Hi Abhijit,

Dropwizard only integrates with Logback out of the box. If you want to use another logging framework such as Log4j 2.x, you'll have to use the "external" logging configuration and provide your own configuration for the logging framework you've chosen.


Regards,
Jochen

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 dropwizard-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dropwizard-user/CAKvMTewzKc5ckmZWVqLFUV9xTYVa9WPtBFCixJe06tgySe5qVQ%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages