Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
Description
Dear QoS team,
The justification for the improvement is to provide a smooth and backward-compatible switch between Java standard output and Slf4J SimpleLogger without any changes in output message pattern.
The vast majority of static code analyzers consider printing directly to standard output as a bad practice, proposing to use a dedicated logger as a solution (e.g. https://rules.sonarsource.com/java/RSPEC-106). In some cases, the output format of a message could be restricted and not subject to change. That leaves the message format pattern as "<message><line_separator>" for the dedicated logger.
At more "advanced" logging frameworks this can be controlled by setting different pattern layouts but in the slf4j-simple module, it's handled by simplelogger.properties configuration or system properties. The module already has specific properties to control the output of the date-time, thread name, and logger name, but missing one more to skip log level output such as "org.slf4j.simpleLogger.showLogLevel=true".