mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
Fix checkstyle and test for logging output stream
Commit a156629b didn't quite fix the botched backport. This commit does.
This commit is contained in:
parent
a156629b4a
commit
fbfc5a327c
@ -247,8 +247,10 @@ public class LogConfigurator {
|
|||||||
|
|
||||||
// Redirect stdout/stderr to log4j. While we ensure Elasticsearch code does not write to those streams,
|
// Redirect stdout/stderr to log4j. While we ensure Elasticsearch code does not write to those streams,
|
||||||
// third party libraries may do that
|
// third party libraries may do that
|
||||||
System.setOut(new PrintStream(new LoggingOutputStream(LogManager.getLogger("stdout"), Level.INFO), false, StandardCharsets.UTF_8.name()));
|
System.setOut(new PrintStream(new LoggingOutputStream(LogManager.getLogger("stdout"), Level.INFO),
|
||||||
System.setOut(new PrintStream(new LoggingOutputStream(LogManager.getLogger("stderr"), Level.WARN), false, StandardCharsets.UTF_8.name()));
|
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() {
|
private static void configureStatusLogger() {
|
||||||
|
@ -53,9 +53,9 @@ public class LoggingOutputStreamTests extends ESTestCase {
|
|||||||
PrintStream printStream;
|
PrintStream printStream;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void createStream() {
|
public void createStream() throws Exception {
|
||||||
loggingStream = new TestLoggingOutputStream();
|
loggingStream = new TestLoggingOutputStream();
|
||||||
printStream = new PrintStream(loggingStream, false, StandardCharsets.UTF_8);
|
printStream = new PrintStream(loggingStream, false, StandardCharsets.UTF_8.name());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testEmptyLine() {
|
public void testEmptyLine() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user