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

添加出错时的日志写入

parent 2751db4e
...@@ -97,7 +97,7 @@ class BaseApplication : MultiDexApplication() { ...@@ -97,7 +97,7 @@ class BaseApplication : MultiDexApplication() {
LogFileUtils.writeLog( LogFileUtils.writeLog(
ContextUtils.getContext(), ContextUtils.getContext(),
DateUtils.getDateStringByTimeStamp(System.currentTimeMillis()) DateUtils.getDateStringByTimeStamp(System.currentTimeMillis())
.toString() + " " + message + "\n" .toString() + " $message" + "\n"
) )
} }
if (BuildConfig.DEBUG) { if (BuildConfig.DEBUG) {
...@@ -107,6 +107,13 @@ class BaseApplication : MultiDexApplication() { ...@@ -107,6 +107,13 @@ class BaseApplication : MultiDexApplication() {
loggingInterceptor.level = MiyaHttpLoggingInterceptor.Level.BODY loggingInterceptor.level = MiyaHttpLoggingInterceptor.Level.BODY
} catch (ex: Exception) { } catch (ex: Exception) {
ex.printStackTrace() ex.printStackTrace()
if (!LogFileUtils.isProhibitWrite) {
LogFileUtils.writeLog(
ContextUtils.getContext(),
DateUtils.getDateStringByTimeStamp(System.currentTimeMillis())
.toString() + "异常: ${ex.message}" + "\n"
)
}
} }
MiYaPayMobileApiClient.init(true, loggingInterceptor) MiYaPayMobileApiClient.init(true, loggingInterceptor)
} }
......
...@@ -69,12 +69,6 @@ class SettingActivity : BaseActivity() { ...@@ -69,12 +69,6 @@ class SettingActivity : BaseActivity() {
// } // }
// } // }
if (countClick < 5) { if (countClick < 5) {
if (countClick >= 2 && countClick < 5) {
Toasty.info(
applicationContext,
getString(R.string.toast_click_again, 5 - countClick)
).show()
}
return 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