I have looked at the documentation for android.util.Log and I\'m not sure exactly what the difference between Log.e()
and Log.wtf()
is. Is one pref
Actually, this might be a documentation error in Android SDK, what a surprise... Doc says:
The error will always be logged at level ASSERT with the call stack.
But source code says this:
static int wtf(int logId, String tag, String msg, Throwable tr, boolean localStack, boolean system) {
...
int bytes = printlns(logId, ERROR, tag, msg, localStack ? what : tr);
...
}
So, Log.wtf() and Log.e() both have the same priority, ERROR.
The difference is that Log.wtf() calls for onTerribleFailure() call back, which "Report a serious error in the current process. May or may not cause the process to terminate (depends on system settings)."
So, in other words, Log.wtf() could crash your app.
Below is a code snippet:
if (ActivityManager.getService().handleApplicationWtf(
mApplicationObject, tag, system,
new ApplicationErrorReport.ParcelableCrashInfo(t))) {
// The Activity Manager has already written us off -- now exit.
Process.killProcess(Process.myPid());
System.exit(10);
}