Fix backport compilation

Java 8 doesn't have a PrintStream ctor which takes a Charset object,
only a charset name. This fixes that.
This commit is contained in:
Ryan Ernst 2020-01-25 11:13:33 -08:00
parent a564cac7ba
commit a156629b4a
1 changed files with 2 additions and 2 deletions

View File

@ -247,8 +247,8 @@ public class LogConfigurator {
// Redirect stdout/stderr to log4j. While we ensure Elasticsearch code does not write to those streams,
// third party libraries may do that
System.setOut(new PrintStream(new LoggingOutputStream(LogManager.getLogger("stdout"), Level.INFO), false, StandardCharsets.UTF_8));
System.setOut(new PrintStream(new LoggingOutputStream(LogManager.getLogger("stderr"), Level.WARN), false, StandardCharsets.UTF_8));
System.setOut(new PrintStream(new LoggingOutputStream(LogManager.getLogger("stdout"), Level.INFO), false, StandardCharsets.UTF_8.name()));
System.setOut(new PrintStream(new LoggingOutputStream(LogManager.getLogger("stderr"), Level.WARN), false, StandardCharsets.UTF_8.name()));
}
private static void configureStatusLogger() {