Download Android App in your Android Device from Google Play Store
- Search for "Withoutbook Practice Exam Test" in Mobile/Tablet Play Store
Practice InterviewNew Search by Name or Email

Exams Attended

Make Homepage

Bookmark this page

Subscribe Email Address

Log4j Interview Questions and Answers

Ques. Describe about logger levels in log4j.
Ans. Before using log4j framework, one should be aware of different categories of log messages. Following are 5 categories:

DEBUG
The DEBUG Level is used to indicate events that are useful to debug an application. Handling method for DEBUG level is: debug().

INFO
INFO level is used to highlight the progress of the application. Handling method for INFO level is: info().

WARN
The WARN level is used to indicate potentially harmful situations. Handling method for WARN level is: warn().

ERROR
The ERROR level shows errors messages that might not be serious enough and allow the application to continue. Handling method for ERROR level is: error().

FATAL
The Fatal level is used to indicate severe events that will may cause abortion of the application. Handling method for FATAL level is: fatal().

If you declare log level as debug in the configuration file, then all the other log messages will also be recorded. 
If you declare log level as info in the configuration file, then info, warn, error and fatal log messages will be recorded.
If you declare log level as warn in the configuration file, then warn, error and fatal log messages will be recorded.
If you declare log level as error in the configuration file, then error and fatal log messages will be recorded.
If you declare log level as fatal in the configuration file, then only fatal log messages will be recorded.
Is it helpful? Yes No

Most helpful rated by users:

©2019 WithoutBook