Sajal Ali
Sajal Ali

Reputation: 437

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: enter image description here

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

Upvotes: 0

Views: 295

Answers (1)

ThomasV
ThomasV

Reputation: 881

If you don't specify .printStackTrace(), you will be fine :

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

Upvotes: 1

Related Questions