From 5ac1ba281daa37803ea5986bc24c3482f9bbd543 Mon Sep 17 00:00:00 2001 From: lizhanwei <Dana_Lee1016@126.com> Date: 星期三, 15 一月 2020 14:56:31 +0800 Subject: [PATCH] app启动的时候,删除三天以前的日志;打印CMD命令,以十六进制打印 --- lib/src/main/java/com/anyun/exam/lib/MyLog.java | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/src/main/java/com/anyun/exam/lib/MyLog.java b/lib/src/main/java/com/anyun/exam/lib/MyLog.java index bec1066..0b24a45 100644 --- a/lib/src/main/java/com/anyun/exam/lib/MyLog.java +++ b/lib/src/main/java/com/anyun/exam/lib/MyLog.java @@ -281,7 +281,7 @@ } public static void delSubDirLogs() { - String dirPath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/nvlog"; + String dirPath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/jiakaolog"; String regx = "^[0-9]{4}-"; Pattern pattern = Pattern.compile(regx); File file = new File(dirPath); @@ -300,6 +300,7 @@ Log.i(TAG, "subDirLogs: 绗﹀悎瑙勫垯^[0-9]{4}- : " + matcher.group(0)); for (int i = 0; i < SDCARD_LOG_FILE_SAVE_DAYS; i++) { String needSaveFileName = logfile.format(getDateBefore(i)); + Log.i(TAG,"needsaveFileName="+needSaveFileName); if (fName.contains(needSaveFileName)) { Log.i(TAG, "delSubDirLogs: 姝og闇�瑕佷繚鐣欙細" + fName + " 鏃ユ湡锛�" + needSaveFileName); needDel = false; -- Gitblit v1.8.0