JobHandler中开启子线程时,支持子线程输出执行日志并通过Rolling查看。(From:kangxinghua@github)

v1.7
xueli.xue 8 years ago
parent 7b59be46c5
commit 14767e30e6

@ -16,7 +16,7 @@ import java.util.Date;
public class XxlJobFileAppender {
private static Logger logger = LoggerFactory.getLogger(XxlJobFileAppender.class);
// for JobThread (support log for child thread)
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal<String> contextHolder = new ThreadLocal<String>();
public static InheritableThreadLocal<String> contextHolder = new InheritableThreadLocal<String>();
public static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

Loading…
Cancel
Save