Android printing stack

How to print stack information in Android:

1:

RuntimeException re = new RuntimeException();
re.fillInStackTrace();
Log.e("info", "info", re);
 
 
2:    
 
  
  
  1. Log.w(TAG, Log.getStackTraceString(new Throwable()));
3:
  1. try {
  2. catch (InterruptedException e) {
  3.     Log.e(TAG, Log.getStackTraceString(e));  
  4. }  

Guess you like

Origin blog.csdn.net/lgdlchshg/article/details/25127323
Recommended