From 5a0acb5945a02a1bdcde9ccbf41b873cbd32c249 Mon Sep 17 00:00:00 2001 From: xuxueli <931591021@qq.com> Date: Wed, 20 Dec 2017 21:28:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0RM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/xxl/job/core/log/XxlJobLogger.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobLogger.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobLogger.java index 1ea06e2d..248d9de0 100644 --- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobLogger.java +++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobLogger.java @@ -31,8 +31,7 @@ public class XxlJobLogger { StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append(xxlJobLoggerFormat.format(new Date())).append(" ") - .append("["+ callInfo.getClassName() +"]").append("-") - .append("["+ callInfo.getMethodName() +"]").append("-") + .append("["+ callInfo.getClassName() + "#" + callInfo.getMethodName() +"]").append("-") .append("["+ callInfo.getLineNumber() +"]").append("-") .append("["+ Thread.currentThread().getName() +"]").append(" ") .append(appendLog!=null?appendLog:""); @@ -40,11 +39,10 @@ public class XxlJobLogger { // appendlog String logFileName = XxlJobFileAppender.contextHolder.get(); - if (logFileName==null || logFileName.trim().length()==0) { - logger.info(">>>>>>>>>>> [{}]: {}", logFileName, formatAppendLog); - } else { + if (logFileName!=null && logFileName.trim().length()>0) { XxlJobFileAppender.appendLog(logFileName, formatAppendLog); - logger.debug(">>>>>>>>>>> [{}]: {}", logFileName, formatAppendLog); + } else { + logger.info(">>>>>>>>>>> {}", formatAppendLog); } }