Logging calls guarded by log condition

Last modified: 03 December 2024

Reports logging calls surrounded with a guard condition. This inspection can be used to adjust with a custom code style.

Example:

After a quick-fix is applied:

This inspection supports Log4j2 and the SLF4J logging frameworks (except builders).

New in 2024.2