/** * Captures System.out and System.err and redirects them * to Redwood logging. * @param captureOut True is System.out should be captured * @param captureErr True if System.err should be captured */ protected static void captureSystemStreams(boolean captureOut, boolean captureErr){ if(captureOut){ System.setOut(new RedwoodPrintStream(STDOUT, realSysOut)); } else { System.setOut(realSysOut); } if(captureErr){ System.setErr(new RedwoodPrintStream(STDERR, realSysErr)); } else { System.setErr(realSysErr); } }
/** * Captures System.out and System.err and redirects them * to Redwood logging. * @param captureOut True is System.out should be captured * @param captureErr True if System.err should be captured */ protected static void captureSystemStreams(boolean captureOut, boolean captureErr){ if(captureOut){ System.setOut(new RedwoodPrintStream(STDOUT, realSysOut)); } else { System.setOut(realSysOut); } if(captureErr){ System.setErr(new RedwoodPrintStream(STDERR, realSysErr)); } else { System.setErr(realSysErr); } }
/** * Captures System.out and System.err and redirects them * to Redwood logging. * @param captureOut True is System.out should be captured * @param captureErr True if System.err should be captured */ protected static void captureSystemStreams(boolean captureOut, boolean captureErr){ if(captureOut){ System.setOut(new RedwoodPrintStream(STDOUT, realSysOut)); } else { System.setOut(realSysOut); } if(captureErr){ System.setErr(new RedwoodPrintStream(STDERR, realSysErr)); } else { System.setErr(realSysErr); } }
/** * Captures System.out and System.err and redirects them * to Redwood logging. * @param captureOut True is System.out should be captured * @param captureErr True if System.err should be captured */ protected static void captureSystemStreams(boolean captureOut, boolean captureErr){ if(captureOut){ System.setOut(new RedwoodPrintStream(STDOUT, realSysOut)); } else { System.setOut(realSysOut); } if(captureErr){ System.setErr(new RedwoodPrintStream(STDERR, realSysErr)); } else { System.setErr(realSysErr); } }