I've an app which crash almost once a day, and I've used the default uncaught exception handler in order to save the crash log
e.g.
Thread.setDefaultUncaughtExceptionHandler(new CustomExceptionHandler("/sdcard/crash"));
However, for normal crash such as stackoverflow (intentional) it can be logged, but for my bug it never get logged. I guess it is because the crash is raised outside the scope of a normal activity. (yes, the crash happen when the app is in the background)
I've also tried to connect the device to my computer and log the logcat out via adb logcat > log.txt
, however, the adb
will timeout for a while (adb device return not connected until I re-plug it again) and the logging will stop.
So, are there any other way I can use to log and identify my bug?
Update: For those suggesting other remote logging tools, I want to say that I've already using setDefaultUncaughtExceptionHandler
to save the exception to a local file, are there any exception that the tools can help but not my current method? I use for debug only, not for production