Thanks to the TeeStream, standard output and standard error are now

written to, in addition to writing to the .log file.
This commit is contained in:
dchandler 2002-10-04 04:52:41 +00:00
parent ef60ccb31b
commit 635b707067
3 changed files with 957 additions and 948 deletions

View File

@ -27,15 +27,22 @@ import java.awt.event.*;
import javax.swing.text.*;
import javax.swing.text.rtf.*;
import org.thdl.util.TeeStream;
public class QDShell extends JFrame {
ResourceBundle messages = null;
QD qd = null;
public static void main(String[] args) {
try {
PrintStream ps = new PrintStream(new FileOutputStream("qd.log"));
System.setErr(ps);
System.setOut(ps);
PrintStream psOut
= new TeeStream(System.out,
new PrintStream(new FileOutputStream("qd.log")));
PrintStream psErr
= new TeeStream(System.err,
new PrintStream(new FileOutputStream("qd.log")));
System.setErr(psErr);
System.setOut(psOut);
}
catch (Exception e) {
}

View File

@ -29,6 +29,7 @@ import javax.swing.text.rtf.*;
import org.thdl.savant.ucuchi.*;
import org.thdl.savant.tib.*;
import org.thdl.util.TeeStream;
public class SavantShell extends JFrame
{
@ -43,9 +44,14 @@ public class SavantShell extends JFrame
public static void main(String[] args) {
try {
java.io.PrintStream ps = new java.io.PrintStream(new java.io.FileOutputStream("savant.log"));
System.setErr(ps);
System.setOut(ps);
PrintStream psOut
= new TeeStream(System.out,
new PrintStream(new FileOutputStream("savant.log")));
PrintStream psErr
= new TeeStream(System.err,
new PrintStream(new FileOutputStream("savant.log")));
System.setErr(psErr);
System.setOut(psOut);
}
catch (Exception e) {
}

File diff suppressed because it is too large Load Diff