S
Sylvain
Hi !
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 ?
Ideal would be such a function :
- store the standard out
- change the standard out to a string reader
- execute the e.printStackTrace()
- log the output string
- restore the standard out
Thank you for your help
Best regards
Sylvain Caillet
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 ?
Ideal would be such a function :
- store the standard out
- change the standard out to a string reader
- execute the e.printStackTrace()
- log the output string
- restore the standard out
Thank you for your help
Best regards
Sylvain Caillet