Re: How to log exception stack traces to log file but not the console at any log4j level?
Wednesday, January 25, 2006 05:17 PM
I think you are doing e.printStackTrace()
this will cause to print exception on console.
you should capture this exception into some string and log the string into file.
try to use e.printStackTrace(printWriter)
and try to make object of printWriter by using StringWriter.
Hope, it will help you.