@@ -0,0 +1,783 @@
+package me.allenz.androidapplog;%0A%0Aimport java.lang.Thread.UncaughtExceptionHandler;%0A%0Apublic class UncaughtExceptionLogger implements UncaughtExceptionHandler %7B%0A%0A%09private UncaughtExceptionHandler mDefaultExceptionHandler;%0A%0A%09public UncaughtExceptionLogger() %7B%0A%09%09this(Thread.getDefaultUncaughtExceptionHandler());%0A%0A%09%7D%0A%0A%09public UncaughtExceptionLogger(%0A%09%09%09final UncaughtExceptionHandler uncaughtExceptionHandler) %7B%0A%09%09this.mDefaultExceptionHandler = uncaughtExceptionHandler;%0A%09%7D%0A%0A%09@Override%0A%09public void uncaughtException(final Thread thread, final Throwable ex) %7B%0A%09%09final Logger logger = LoggerFactory.getLogger(ex.getStackTrace()%5B0%5D%0A%09%09%09%09.getClassName());%0A%09%09logger.error(ex);%0A%09%09if (mDefaultExceptionHandler != null) %7B%0A%09%09%09mDefaultExceptionHandler.uncaughtException(thread, ex);%0A%09%09%7D%0A%09%7D%0A%0A%7D%0A

add class UncaughtExceptionLogger for logging uncaught exception messages