JFM
asked on
redirect exception output to file ?
Hi,
is it possible to redirect the output of printStackTrace(...) of Throwable to a file ?
Maybe by overriding PrintStream or PrintWriter ?
Thanks, JFM.
is it possible to redirect the output of printStackTrace(...) of Throwable to a file ?
Maybe by overriding PrintStream or PrintWriter ?
Thanks, JFM.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Works good, thanks :-)
PrintStream ps = new PrintStream(new FileOutputStream("error.lo
try{
code that throws exception
}
catch(Exception e){
e.printStackTrace(ps);
}