Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to PrintStackTrace

 
surendar prabu
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my application i am writing a log into a file. If there is any exception thrown how can i print the stack trace into the file? I am not able to do this using the printstacktrace method over the exception object thrown.
I am only able to print the exception message but not the complte stack trace. Please help me.

regards,
Surendarprabu
 
Ajay Singh
Ranch Hand
Posts: 182
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should be something like:




see the printStackTrace doc: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Throwable.html#printStackTrace
 
surendar prabu
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank U very much Ajay.

regards
Surendarprabu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic