how to get all actions and exceptions that are running in the project to a file with the help of log4j.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1 Use a Logger mechanism to log all your exceptions and error to a file stored in hard disk drive or a server location
(example : C:\\MyProject\logs\Mylog.txt)The Logger mechanism which im talking about is usage of Log4j which will help in logging all exceptions reported in a application in a separate path.
Log4j.jar has to be placed in the lib folder along with other related jar files.
Useful Link : http://www.mkyong.com/struts/struts-log4j-integration-example/