Skip to content

Replace direct System.out usage with SLF4J logging (java:S106) - #10

Draft
trly wants to merge 1 commit into
mainfrom
sonarqube-s106-slf4j-7c42d238-5cc1-41f6-a50b-655820c2834b
Draft

Replace direct System.out usage with SLF4J logging (java:S106)#10
trly wants to merge 1 commit into
mainfrom
sonarqube-s106-slf4j-7c42d238-5cc1-41f6-a50b-655820c2834b

Conversation

@trly

@trly trly commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Resolves SonarQube rule java:S106Standard outputs should not be used directly to log anything.

Changes in this repository:

  • Adds org.slf4j:slf4j-api (with the slf4j-simple runtime binding) to build.gradle.
  • Introduces a private static final Logger LOGGER in each affected class.
  • Rewrites every System.out.printf call as a parameterized LOGGER.info(...) call, preserving the
    original numeric formatting via String.format where a format specifier was significant.

No program logic or visible output values were changed.

Created by Sourcegraph agentic batch change.

Addresses SonarQube java:S106 by adding an SLF4J logger to each affected
class and routing all standard-output writes through it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant