From 80f2ca2df62ff1cd03046864af504245be078eb2 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期四, 05 六月 2025 10:37:28 +0800 Subject: [PATCH] 2025年06月05日10:37:26 --- app/src/main/java/com/hdl/photovoltaic/other/HdlLogLogic.java | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlLogLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlLogLogic.java index 357d044..dab21db 100644 --- a/app/src/main/java/com/hdl/photovoltaic/other/HdlLogLogic.java +++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlLogLogic.java @@ -16,10 +16,10 @@ public static boolean isStartPrintLogcat = true; //鏄惁鍚姩鍔犲埌鍐呭瓨閲岄潰鐨勬爣绛�(true:琛ㄧず鍔犲叆锛宖alse锛氳〃绀轰笉鍔犲叆) - public static boolean isStartAddToMemory = false; + public static boolean isStartAddToMemory = true; //榛樿鎵撳嵃鏍囬 - private static String logTitle = "鑷畾涔夎緭鍑烘墦鍗颁俊鎭�"; + private static String logTitle = "";//鑷畾涔夎緭鍑烘墦鍗颁俊鎭� private static final Gson gson = new Gson(); @@ -71,7 +71,7 @@ customLogObject.setCode(code); String json = logTitle + (UserConfigManage.getInstance().isBAccount() ? "(B绔�)==" : "(C绔�)==") + gson.toJson(customLogObject); if (isStartPrintLogcat) { - System.out.println(json); + System.out.println(json.replace("\\", "")); } if (isStartAddToMemory) { if (isAddToMemory) { @@ -90,8 +90,9 @@ */ public static void writeLog(String strLog) { synchronized (HdlLogLogic.class) { - strLog = TimeUtils.getTimeFromTimestamp(System.currentTimeMillis()) + "s%" + " " + strLog;//鍔犳墦鍗版椂闂�(s%鍗犱綅绗︼紝璁剧疆鏄剧ず鏃堕棿涓嶅悓瀛椾綋棰滆壊) - HdlFileLogic.getInstance().appendFile(HdlFileLogic.getInstance().getLogFileNamePath(), strLog); + strLog = TimeUtils.getTimeFromTimestamp(System.currentTimeMillis(), true) + "s%" + " " + strLog;//鍔犳墦鍗版椂闂�(s%鍗犱綅绗︼紝璁剧疆鏄剧ず鏃堕棿涓嶅悓瀛椾綋棰滆壊) + + HdlFileLogic.getInstance().appendFile(HdlFileLogic.getInstance().getLogFileNamePath(), strLog.replace("\\", "")); } } -- Gitblit v1.8.0