> Hi !
>
[quoted text clipped - 14 lines]
>
> Sylvain Caillet
Use printStackTrace(PrintWriter w) ?
Sylvain - 06 Mar 2008 08:32 GMT
Thank you.
Sylvain
>> Hi !
>>
[quoted text clipped - 16 lines]
>
> Use printStackTrace(PrintWriter w) ?
> I would like to be able to log for an exception, not only the
> e.getMessage() but the whole e.printStackTrace(). Does anybody know
> how to redirect temporarily the standard out to a string ?
You don't need to do that. Just attach a StringWriter to a PrintWriter and
use the appropriate e.printStackTrace().
Example at http://www.rgagnon.com/javadetails/java-0029.html
Bye.

Signature
Real Gagnon from Quebec, Canada
* Java, Javascript, VBScript and PowerBuilder code snippets
* http://www.rgagnon.com/howto.html
* http://www.rgagnon.com/bigindex.html
Sylvain - 06 Mar 2008 08:32 GMT
thank you. It works fine.
Sylvain
>> I would like to be able to log for an exception, not only the
>> e.getMessage() but the whole e.printStackTrace(). Does anybody know
[quoted text clipped - 6 lines]
>
> Bye.