Inspectopedia Help

'public' method without logging

Reports any public methods that do not contain a logging statement. This inspection does not report simple getters and setters.

For example:

public class Crucial { private static final Logger LOG = LoggerFactory.getLogger(Crucial.class); public void doImportantStuff() { // warning on this method } public void doOtherStuff() { LOG.info("do other stuff"); } }

Use the table below to specify Logger class names. Public methods that do not use instance methods of the specified classes will be reported by this inspection.

Inspection options

Option

Type

Default

Logger class names

StringList

[java.util.logging.Logger, org.slf4j.Logger, org.apache.commons.logging.Log, org.apache.log4j.Logger, org.apache.logging.log4j.Logger]

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023