/** * Initializes the logger. */ protected void initialize() { super.initialize(); try { m_StdOut = new Tee(System.out); System.setOut(m_StdOut); m_StreamOut = new OutputPrintStream(this, m_StdOut.getDefault()); m_StdOut.add(m_StreamOut); m_StdErr = new Tee(System.err); System.setErr(m_StdErr); m_StreamErr = new OutputPrintStream(this, m_StdErr.getDefault()); m_StdErr.add(m_StreamErr); } catch (Exception e) { // ignored } }
/** * initializes the object with the given default printstream, e.g., * System.out. * * @param def the default printstream, remains also after calling clear() */ public Tee(PrintStream def) { super(def); m_Default = def; clear(); }
/** * initializes the object, with a default printstream. */ public Tee() { this(System.out); }
/** * initializes the object, with a default printstream. */ public Tee() { this(null); }