Log4j is a fast, flexible and reliable logging framework written in Java developed in early 1996. It is distributed under the Apache software license and can be used for small to large scale projects. It has been ported to the languages like C, C++, C#, Python, etc.
What are the different logging levels?
There are several logging levels that you can configure in you applicaiton
Those are FATAL,ERROR,WARN,TRACE,DEBUG,INFO OR ALL in apache logging. Default logging level is INFO.
Explain why to use Log4j?
Being open-source its completely free to use.
You can easily save log information into either files or even databases.
Can be used for projects of any sizes small or large.
What are different types of logs?
Usually in any application there two types of logs
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.
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.
Mention what are the three principal components of Log4j?