protected synchronized void append(String x, boolean newline) { PrintStream tmp = type == 1 ? stdout.get() : stderr.get(); if (tmp == null) return; if (newline) tmp.println(x); else tmp.print(x); }
protected void error(String msg) { old_stderr.println(msg); }
protected void println(String msg) { old_stdout.println(msg); }
protected static void print(PrintStream out, String msg, String classname, String method_name) { out.println( msg + "[" + Thread.currentThread().getId() + "] " + classname + "." + method_name + "()"); }