Example:
public class Principal {
void bad(Object object) {
if (true) {
LOG.debug("log log log " + expensiveCalculation(object));
}
LOG.debug("some more logging " + expensiveCalculation(1));
}
void good(Object) {
if (LOG.isDebug()) {
LOG.debug("value: " + expensiveCalculation(object));
}
}
}
Configure the inspection:
Use the table to specify the logging methods this inspection should warn on, with the corresponding log condition text.