Java 类org.apache.logging.log4j.io.IoBuilder 实例源码

项目:LanternServer    文件:ConsoleManager.java   
public void init() {
    // Register the fqcn for the console source
    REDIRECT_FQCNS.add(LanternConsoleSource.class.getName());
    // Register the fqcn for the message channel
    REDIRECT_FQCNS.add(MessageChannel.class.getName());
    // Ignore the cause stack as fqcn, stack traces will
    // already be printed nicely with PrettyPrinter
    IGNORE_FQCNS.add(LanternCauseStack.class.getName());

    System.setOut(IoBuilder.forLogger(REDIRECT_OUT).setLevel(Level.INFO).buildPrintStream());
    System.setErr(IoBuilder.forLogger(REDIRECT_ERR).setLevel(Level.ERROR).buildPrintStream());
}