From c338aa60df58bee9f4c25afedf94fe6930a119c1 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 29 七月 2020 19:01:56 +0800 Subject: [PATCH] SpringContext中的循环任务优化,添加业务监控 --- fanli/src/main/java/com/yeshi/fanli/log/LogHelper.java | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/log/LogHelper.java b/fanli/src/main/java/com/yeshi/fanli/log/LogHelper.java index b4d47e2..63ae0e8 100644 --- a/fanli/src/main/java/com/yeshi/fanli/log/LogHelper.java +++ b/fanli/src/main/java/com/yeshi/fanli/log/LogHelper.java @@ -12,7 +12,7 @@ import org.apache.log4j.Logger; -import com.yeshi.fanli.util.TimeUtil; +import org.yeshi.utils.TimeUtil; public class LogHelper { // log @@ -49,6 +49,9 @@ private static Logger userProtocolListenLog = Logger.getLogger("userProtocolListenLog"); private static Logger teamLogger = Logger.getLogger("teamLog"); + + + private static Logger cloudLogger = Logger.getLogger("cloudLog"); public static void userProtocolListen(Object obj) { @@ -109,7 +112,12 @@ vipInfoLogger.info(obj); } - + public static void cloudInfo(Object info) { + if (info != null) + cloudLogger.info(info); + } + + /** * 鐧诲綍淇℃伅 * @@ -247,5 +255,5 @@ String content = String.format("閾炬帴:%s 鍙傛暟:%s 鍝嶅簲鏃堕棿:%s", url, paramsStr, time + ""); requestTimeLogger.info(content); } - + } -- Gitblit v1.8.0