Commit 92d28b09 authored by 赵鹏翔's avatar 赵鹏翔

完善支付日志处理,待处理支付流程中的日志输出

parent a5a2e488
......@@ -2,6 +2,7 @@ package com.miya.fastcashier
import android.app.Activity
import android.os.Bundle
import android.os.Environment
import com.blankj.utilcode.util.LogUtils
import com.elvishew.xlog.LogConfiguration
import com.elvishew.xlog.LogLevel
......@@ -23,6 +24,7 @@ import com.miya.fastcashier.utils.manage.LocalKeyDataMKManageKit
import com.miya.print.PrinterManager
import com.sdy.miya.moblie.component.pay.core.net.MiYaPayMobileApiClient
import com.sdy.miya.moblie.component.pay.core.net.MiyaHttpLoggingInterceptor
import com.sdy.miya.moblie.component.pay.core.utils.PayLogFileUtils
import com.tencent.mmkv.MMKV
import java.io.File
import java.util.*
......@@ -77,6 +79,17 @@ class MiyaApplication : BaseApplication() {
filePrinter
)
//支付日志文件夹
PayLogFileUtils.initLogPath(
Environment.getExternalStorageDirectory().path +
File.separator +
"miyaterminal" +
File.separator +
"log" +
File.separator +
"paylog" + File.separator
)
var loggingInterceptor: MiyaHttpLoggingInterceptor? = null
try {
loggingInterceptor = MiyaHttpLoggingInterceptor { message ->
......
......@@ -25,6 +25,7 @@ import com.miya.fastcashier.utils.*
import com.miya.fastcashier.utils.manage.AccountPasswordManageKit
import com.miya.fastcashier.utils.manage.LocalKeyDataMKManageKit
import com.miya.fastcashier.viewmodel.MainViewModel
import com.sdy.miya.moblie.component.pay.core.utils.PayLogFileUtils
import es.dmoral.toasty.Toasty
import java.util.*
......@@ -98,6 +99,7 @@ class MainActivity : BaseActivity() {
checkAccountPassword()
OrderRecordManageKit.clearOrderDataYeaterday()
LogFileUtils.deleteLog(LogFileUtils.DAYS_INTERVAL_LOG_DELETE)
PayLogFileUtils.deleteLog(LogFileUtils.DAYS_INTERVAL_LOG_DELETE)
}
private fun toRefund() {
......
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