Stop configuring the Logback console appender to use UTF-8

Previously, the default Logback configuration set the console
appenders charset to UTF-8. This was inconsistent with the Logback
file appender and Log4j2's console and file appenders, all of which
used the platform's default.

This commit removes the configuration of the Logback console
appender's charset. This means that it will use the platform's
default charset, aligning it with the Logback file appender and
both Log4j2 appenders.

Closes gh-11611
This commit is contained in:
Andy Wilkinson 2018-01-17 19:07:34 +00:00
parent 54c0cf513b
commit 87182a3a2b
2 changed files with 0 additions and 3 deletions

View File

@ -17,7 +17,6 @@
package org.springframework.boot.logging.logback;
import java.lang.reflect.Method;
import java.nio.charset.StandardCharsets;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.encoder.PatternLayoutEncoder;
@ -117,7 +116,6 @@ class DefaultLogbackConfiguration {
String logPattern = this.patterns.getProperty("logging.pattern.console",
CONSOLE_LOG_PATTERN);
encoder.setPattern(OptionHelper.substVars(logPattern, config.getContext()));
encoder.setCharset(StandardCharsets.UTF_8);
config.start(encoder);
appender.setEncoder(encoder);
config.appender("CONSOLE", appender);

View File

@ -9,7 +9,6 @@ initialization performed by Boot
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
<charset>utf8</charset>
</encoder>
</appender>
</included>