Log4j Interview Questions and Answers
Question: What are different types of logs?Answer: Usually in any application there two types of logs.1. Application server logs:- These are the logs configured at the application server level. for example in tomcat, we have log files called localhost.log, tomcat.log, catalina.log, stdout.log, sterr.log. all these logs are showing with default settings defined in logging.properites located in your tomcat installation folder/conf folder. If you want custom settings, we have to change the different parameters in logging.properties in conf folder of tomcat directory. 2. Application logs:- We can define logging at each applicaiton level, For this we have to create log4j.xml or logging.properties in WEB-INF/classes folder. |
Is it helpful?
Yes
No
Most helpful rated by users:
- What is Log4j?
- What are the different logging levels?
- Describe about logger levels in log4j.
- What are the three main components in log4j?
- What are different appenders that can configure in log4j?