Just like I said:
java MyClass 2>error.log
"2" stands for "stderr" in shell redirection, same as "1" is for "stdout" and
"0" for "stdin"
So if you want to put both System.out & System.err in the same log, you may use:
java MyClass 2>1 1>error.log
If u r interested in, I wrote a small class that replaces System.err and has
some useful features:
- writes everything from System.err to console, logfile, message dialog, or any
combination of these three.
- any time an uncaught exception occurs, it pops up a message dialog
(JOptionPane) showing the stack trace.
- notifies your application each time an uncaught exception occurs.

Cătălin.

Tu ai scris în J , 06 MAI 1999 :
>You mean you want to do this from a script/shell (something like java
>2>error.log) or from a java application ?
>
>In a shell:
>
>java MyClass > error.log
>
>The only problem is that this pipes std out into err.log not std err ...


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to