I know that there is a function in java that standard output stream But was any standard output already stored or reset to standard output? You can hold the file descriptor for the standard. To reset the standard outset to print the console, you do Another way is to just hold the original object: System.setOut ..
System.setOut (new printstream (new fileproperty.);
PrintStream stdout = System.out; System.setOut (new printstream (logfile)); // Reset to .setOut (stdout); // standard output
Comments
Post a Comment