Log4j Interviewfragen und Antworten
Question: Describe about logger levels in log4j.Answer: 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. |
Zum Wiederholen speichern
Speichere diesen Eintrag als Lesezeichen, markiere ihn als schwierig oder lege ihn in einem Wiederholungsset ab.
Melde dich an, um Lesezeichen, schwierige Fragen und Wiederholungssets zu speichern.
Ist das hilfreich? Ja Nein
Am hilfreichsten laut Nutzern:
- What is Log4j?
- What are the different logging levels?
- Describe about logger levels in log4j.
- What are the three main components in log4j?
- What is the importance of logging applications?