+ 2

How can i save logs in txt file using log4j?

Hello everyone, Im developing a Java application and I want to know How to register the application logs in a file for Future checks. Im Very thankfull If you can help me.

18th Mar 2018, 3:17 PM
Rafael Leonardo De Lima
Rafael Leonardo De Lima - avatar
2 Réponses
+ 11
Make sure the log4j jar file is available and you configured the log4j.xml. Import the package, get the logger, log. Code example and more: https://www.tutorialspoint.com/log4j/log4j_sample_program.htm
1st Apr 2018, 7:26 PM
Tashi N
Tashi N - avatar
+ 1
Thanks Bro, It helped a Lot!!
1st Apr 2018, 9:22 PM
Rafael Leonardo De Lima
Rafael Leonardo De Lima - avatar