我有一个这样的代码片段:
Log.i(tmpTag, "B4 URL CHANGE: URL in response = " + responseURL + ".\nLast URL = " + mLastUrl); //SHOWN IN LOGCAT
if (m_CurrentEventName.contentEquals("forgotpassword")) {
mLastUrl = responseURL.replace("../../../", "");
} else if (m_CurrentEventName.contentEquals("tskstdlogin") && responseURL.indexOf("changepassword") != -1) {
mLastUrl = responseURL.replace("../../../", "");
} else {
mLastUrl = responseURL;
}
Log.i(tmpTag, "AFTER URL CHANGE: URL in response = " + responseURL + "\nLast URL = " + mLastUrl); //NOT SHOWN IN LOGCAT
我期待两个日志语句,但只有第一个显示在 LogCat 中,如下所示:
08-27 09:39:06.867: I/bindDataTask(1994): B4 URL LOOP: URL in response = "some internal url".
08-27 09:39:06.867: I/bindDataTask(1994): Last URL = "some internal url".
知道为什么会这样吗?