Android - print full exception backtrace to log -


i have try/catch block throws exception , see information exception in android device log.

i read log of mobile device command development computer:

/home/dan/android-sdk-linux_x86/tools/adb shell logcat 

i tried first:

try {     // code buggy code } catch (exception e) {     e.printstacktrace(); } 

but doesn't print log. that's pity because have helped lot.

the best have achieved is:

try {     // code buggy code } catch (exception e) {     log.e("myapp", "exception: " + e.getmessage());                  log.e("myapp", "exception: " + e.tostring()); } 

better nothing not satisfying.

do know how print full backtrace log?

thanks.

try {     // code might throw exception } catch (exception e) {     log.e("myapp", "exception", e); } 

Comments

Popular posts from this blog

400 Bad Request on Apache/PHP AddHandler wrapper -

Add email recipient to all new Trac tickets -

php - Change action and image src url's with jQuery -