Skip to content

Commit

Permalink
remove redirect System.out 因为会影响SourceLogger elastic#50259
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyunpeng committed Aug 8, 2024
1 parent 1d1f43c commit 5e5a4ee
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,10 @@ public FileVisitResult visitFile(final Path file, final BasicFileAttributes attr

// 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.name()));
System.setErr(new PrintStream(new LoggingOutputStream(LogManager.getLogger("stderr"), Level.WARN),
false, StandardCharsets.UTF_8.name()));
// System.setOut(new PrintStream(new LoggingOutputStream(LogManager.getLogger("stdout"), Level.INFO),
// false, StandardCharsets.UTF_8.name()));
// System.setErr(new PrintStream(new LoggingOutputStream(LogManager.getLogger("stderr"), Level.WARN),
// false, StandardCharsets.UTF_8.name()));
}

private static void configureStatusLogger() {
Expand Down

0 comments on commit 5e5a4ee

Please sign in to comment.