Inspectopedia Help

Log condition does not match logging call

Reports is log enabled for conditions of if statements that do not match the log level of the contained logging call.

For example:

if (LOG.isTraceEnabled()) { // debug level logged, but checked for trace level LOG.debug("some log message"); }

This inspection understands the java.util.logging, Log4j, Log4j2, Apache Commons Logging and the SLF4J logging frameworks.

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Java, 233.SNAPSHOT

Last modified: 13 July 2023