FloggerRedundantIsEnabled
Logger level check is already implied in the log() call. An explicit atLEVEL().isEnabled() check is redundant.

Severity
WARNING

The problem

Guarding flogger log statements with an explicit log level check is redundant, since the log statement already contains the desired log level and is inexpensive to evaluate if the specified log level is disabled.

This is redundant:

if (logger.atInfo().isEnabled()) {
   logger.atInfo().log(\"blah\");
}

If the log statement’s arguments are expensive to evaluate, consider using lazy argument evaluation (https://google.github.io/flogger/examples#logging-with-lazy-argument-evaluation-java8):

logger.atFine().log(\"Value: %s\", lazy(() -> process(x, y)));

Suppression

Suppress false positives by adding the suppression annotation @SuppressWarnings("FloggerRedundantIsEnabled") to the enclosing element.