Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: How do Log Levels work or tell the log level hierarchy?
Answer:

A log request of level p in a logger with level q is enabled if p >= q. This rule is at the heart of log4j. It assumes that levels are ordered. For the standard levels, we have ALL < DEBUG < INFO < WARN < ERROR < FATAL < OFF.

For example: if the log level is mentioned as 'WARN' in the log4j properties. Then the logs will be coming in the log file are: WARN, ERROR, FATAL

Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook