Wednesday, September 27, 2017

View or Suppress Logback Status

Logback always shows status statements if there are configuration errors


Logback will log its own status statements to the console if you have any configuration problems resulting in WARN or ERROR messages, which will also show INFO messages. The Logback levels are, from lowest level to highest level:

TRACE < DEBUG < INFO < WARN < ERROR

(See Logback Architecture: error levels for details.)

See Logback status statements


To see Logback's status statements in the console (standard out) regardless of whether or not there are any configuration errors, set the debug attribute to true in the configuration element.
  <configuration debug="true">
    ...
  <configuration>

Suppress Logback status statements


To suppress display of Logback's status statements to the console, omit the debug attribute in the configuration element or set it to false. This will not suppress status statements if there are configuration problems with Logback.
  <configuration>
    ...
  </configuration>
If there is no debug attribute or it's set to false and you see Logback status statements, fix the problems causing the WARN or ERROR statements and the statements will no longer display.

If you can't fix the configuration problem but want to suppress the status statements, you can configure an alternate StatusListener like NopStatusListener to completely remove status statements.
  <configuration>
    <statusListener class="ch.qos.logback.core.status.NopStatusListener" />
    ...
  </configuration>
See also:

Logback Configuration: Automatic printing of status messages in case of warning or errors
Logback Configuration: Show status data
Logback Configuration

Set Cmder (ConEmu) console emulator to open new tab in current directory with Bash shell

Windows is a truly bad operating system for almost everything except games. Unfortunately sometimes we have to use it for web development. I...