Commit fe3304e3 authored by 赵鹏翔's avatar 赵鹏翔

添加出错时的日志写入

parent 2751db4e
......@@ -97,7 +97,7 @@ class BaseApplication : MultiDexApplication() {
LogFileUtils.writeLog(
ContextUtils.getContext(),
DateUtils.getDateStringByTimeStamp(System.currentTimeMillis())
.toString() + " " + message + "\n"
.toString() + " $message" + "\n"
)
}
if (BuildConfig.DEBUG) {
......@@ -107,6 +107,13 @@ class BaseApplication : MultiDexApplication() {
loggingInterceptor.level = MiyaHttpLoggingInterceptor.Level.BODY
} catch (ex: Exception) {
ex.printStackTrace()
if (!LogFileUtils.isProhibitWrite) {
LogFileUtils.writeLog(
ContextUtils.getContext(),
DateUtils.getDateStringByTimeStamp(System.currentTimeMillis())
.toString() + "异常: ${ex.message}" + "\n"
)
}
}
MiYaPayMobileApiClient.init(true, loggingInterceptor)
}
......
......@@ -69,12 +69,6 @@ class SettingActivity : BaseActivity() {
// }
// }
if (countClick < 5) {
if (countClick >= 2 && countClick < 5) {
Toasty.info(
applicationContext,
getString(R.string.toast_click_again, 5 - countClick)
).show()
}
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment