This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.ByteArrayOutputStream; | |
import java.io.OutputStream; | |
import java.io.PrintStream; | |
import org.slf4j.Logger; | |
public class LoggingOutputStream extends OutputStream { | |
public static void redirectSysOutAndSysErr(Logger logger) { | |
System.setOut(new PrintStream(new LoggingOutputStream(logger, LogLevel.INFO))); |