Comparing Log Levels

To compare the severity of two logging levels, use Level.intValue().
// Find the more severe log level Level level1 = Level.INFO; Level level2 = Level.CONFIG; if (level1.intValue() > level2.intValue()) { // level1 is more severe } else if (level1.intValue() < level2.intValue()) { // level2 is more severe } else { // level1 == level2 }

Post a comment

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image. Ignore spaces and be careful about upper and lower case.