Inspectopedia 2025.2 Help

Use of 'System.out' or 'System.err'

Reports usages of System.out or System.err.

Such statements are often used for temporary debugging and should be either removed from the production code, or replaced by a more robust logging facility.

The provided quick-fix supports SLF4J and Log4j 2. It replaces System.out and System.err calls with log calls

Example:

public static void test(Object o) { System.out.println("Test: "+ o); }

After the quick-fix is applied:

private static final Logger log = LoggerFactory.getLogger(Test.class); public static void test(Object o) { log.info("Test: {}", o);; }

Locating this inspection

By ID

Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.

UseOfSystemOutOrSystemErr
Via Settings dialog

Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.

Settings or Preferences | Editor | Inspections | Java | Code maturity

Use the Log method for 'System.err' option to specify a method which it is used to log a message for 'System.err' calls. Use the Log method for 'System.out' option to specify a method which it is used to log a message for 'System.out' calls.

Inspection options

Here you can find the description of settings available for the Use of 'System.out' or 'System.err' inspection, and the reference of their default values.

Log method for 'System.err'

Default value:

error

Other available settings:

  • trace

  • debug

  • info

  • warn

Log method for 'System.out'

Default value:

info

Other available settings:

  • trace

  • debug

  • warn

  • error

Suppressing Inspection

You can suppress this inspection by placing the following comment marker before the code fragment where you no longer want messages from this inspection to appear:

//noinspection UseOfSystemOutOrSystemErr

More detailed instructions as well as other ways and options that you have can be found in the product documentation:

Inspection Details

By default bundled with:

IntelliJ IDEA 2025.2, Qodana for JVM 2025.2,

Last modified: 18 September 2025