脚本任务异常Log输出优化

master
xuxueli 7 years ago
parent c68e96a380
commit 5c24778f3d
  1. 1
      doc/XXL-JOB官方文档.md
  2. 4
      xxl-job-core/src/main/java/com/xxl/job/core/util/ScriptUtil.java

@ -1200,6 +1200,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
- 9、任务日志查询速度优化,百万级别日志量搜索速度提升1000倍;
- 10、底层LocalCache组件兼容性优化,支持jdk、jdk10编译部署;
- 11、[迭代中]回调log优化,支持展示在rolling log中,方便排查问题;
- 12、脚本任务异常Log输出优化;
### TODO LIST

@ -1,5 +1,6 @@
package com.xxl.job.core.util;
import com.xxl.job.core.log.XxlJobLogger;
import org.apache.commons.exec.CommandLine;
import org.apache.commons.exec.DefaultExecutor;
import org.apache.commons.exec.PumpStreamHandler;
@ -75,6 +76,9 @@ public class ScriptUtil {
exec.setStreamHandler(streamHandler);
int exitValue = exec.execute(commandline); // exit code: 0=success, 1=error
return exitValue;
} catch (Exception e) {
XxlJobLogger.log(e);
return -1;
}
}

Loading…
Cancel
Save