master
xuxueli 7 years ago
parent 2a94a142e3
commit 5a0acb5945
  1. 10
      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);
}
}

Loading…
Cancel
Save