From 8c93d2e3b22ac543f8f94c2cf0eb982258fb708b Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期六, 07 十二月 2019 15:33:00 +0800 Subject: [PATCH] Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div --- fanli/src/main/java/com/yeshi/fanli/log/PushLogHelper.java | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/log/PushLogHelper.java b/fanli/src/main/java/com/yeshi/fanli/log/PushLogHelper.java index 91c7da7..311916f 100644 --- a/fanli/src/main/java/com/yeshi/fanli/log/PushLogHelper.java +++ b/fanli/src/main/java/com/yeshi/fanli/log/PushLogHelper.java @@ -77,6 +77,36 @@ } catch (IOException e1) { } } + + + public static void oppoError(Throwable e) { + String date = TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy_MM_dd"); + String os = System.getProperty("os.name"); + String filePath = String.format("/usr/local/tomcat8/logs/push/oppo_error_detail_%s.txt", date); + if (os.toLowerCase().startsWith("win")) { + filePath = String.format("C:/logs/push/oppo_error_detail_%s.txt", date); + } + + try { + saveErrorLog(e, filePath); + } catch (IOException e1) { + } + } + + + public static void vivoError(Throwable e) { + String date = TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy_MM_dd"); + String os = System.getProperty("os.name"); + String filePath = String.format("/usr/local/tomcat8/logs/push/vivo_error_detail_%s.txt", date); + if (os.toLowerCase().startsWith("win")) { + filePath = String.format("C:/logs/push/vivo_error_detail_%s.txt", date); + } + + try { + saveErrorLog(e, filePath); + } catch (IOException e1) { + } + } public static void saveErrorLog(Throwable e, String filePath) throws IOException { // 鍒涘缓鏂囦欢澶� -- Gitblit v1.8.0