[slf4j-dev] [JIRA] Updates for SLF4J-508: Control log level output in the simple logger pattern layout

QOS.CH (JIRA) noreply-jira at qos.ch
Mon Feb 15 03:33:00 CET 2021


SLF4J / SLF4J-508 [Open]
Control log level output in the simple logger pattern layout

==============================

Here's what changed in this issue in the last few minutes.
This issue has been created

There is 1 comment.
This issue is now assigned to you.

View or comment on issue using this link
https://jira.qos.ch/browse/SLF4J-508

==============================
 Issue created
------------------------------

Dmitriy Fedoriv created this issue on 15/Feb/21 3:20 AM
Summary:              Control log level output in the simple logger pattern layout
Issue Type:           Improvement
Assignee:             SLF4J developers list
Components:           slf4j-simple
Created:              15/Feb/21 3:20 AM
Labels:               layouts pattern
Priority:             Minor
Reporter:             Dmitriy Fedoriv
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".

==============================
 1 comment
------------------------------

Dmitriy Fedoriv on 15/Feb/21 3:26 AM
Here is the link to related PR - https://github.com/qos-ch/slf4j/pull/256


==============================
 This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)



More information about the slf4j-dev mailing list