app/src/main/java/safeluck/drive/evaluation/app.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
lib/src/main/java/com/anyun/exam/lib/AYSdk.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
lib/src/main/java/com/anyun/exam/lib/MyLog.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
app/src/main/java/safeluck/drive/evaluation/app.java
@@ -75,6 +75,7 @@ }) .install(); MyLog.delSubDirLogs(); CrashHandler crashHandler = CrashHandler.getInstance(); crashHandler.init(getApplicationContext()); AYSdk.getInstance().init(getApplicationContext()); lib/src/main/java/com/anyun/exam/lib/AYSdk.java
@@ -9,6 +9,8 @@ import android.text.TextUtils; import android.util.Log; import com.anyun.exam.lib.util.ByteUtil; /** * MyApplication2 * Created by lzw on 2019/6/5. 13:15:20 @@ -84,7 +86,7 @@ @Override public void sendCmd(int cmd, String s) { MyLog.i(TAG,"CMD="+cmd+" content:"+(!TextUtils.isEmpty(s)?s:"null")); MyLog.i(TAG,"CMD="+ String.format("0x%x",cmd) +" content:"+(!TextUtils.isEmpty(s)?s:"null")); SvrManager.getInstance().sendCmd(cmd,s); } 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: 此log需要保留:" + fName + " 日期:" + needSaveFileName); needDel = false;