Most of the log calls allow you to print a message and the caught exception. Try this:
try
{
// do something
} catch ( Exception e )
{
if ( log.isDebugEnabled() )
{
log.debug( "Exception throw.", e );
}
}
This will log the message and the stack trace (including line numbers) for the caught exception. There are similar methods for info, warn and error.
darkagn
Veteran Poster
1,197 posts since Aug 2007
Reputation Points: 404
Solved Threads: 200