Hi, i have redirectioned the java outoup to write in a file, it reacts perfectly to the system.out but when the new outpot becomes a printf nothing happens. It would be super if anyone who face with this, could help me Thanks.
The code is:
final PrintStream sysOut = new PrintStream(System.out);
try { // Tee standard output PrintStream out = new PrintStream(new FileOutputStream("out.log")); PrintStream tee = new TeeStream(System.out, out);
System.setOut(tee);
// Tee standard error PrintStream err = new PrintStream(new FileOutputStream("err.log")); tee = new TeeStream(System.err, err);