简体   繁体   中英

printing complete stack trace of an exception in android studio

I am trying to print complete stack trace of the exception thrown by my android code in android studio. For this I am using exception.printStackTrace(); I have also tried to use Log.e("",Log.getStackTraceString(exception)); and Log.e("TAG", "Exception: ", e.printStackTrace()); but the exception is not being displayed on the console, and the console is showing this: 在此处输入图片说明

So how can I print complete stack trace of the exception on console in android studio?

如果不指定.printStackTrace() ,则可以:

Log.e("TAG", "Exception: ", e);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM