Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
aboota
xxl-job
提交
1aac3416
X
xxl-job
项目概览
aboota
/
xxl-job
与 Fork 源项目一致
从无法访问的项目Fork
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
xxl-job
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1aac3416
编写于
6月 06, 2018
作者:
许雪里
提交者:
shangxiaobin
6月 13, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复打印有参日志时报错的问题
上级
56232ef1
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
14 deletion
+20
-14
doc/XXL-JOB官方文档.md
doc/XXL-JOB官方文档.md
+1
-0
xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobFailMonitorHelper.java
...a/com/xxl/job/admin/core/thread/JobFailMonitorHelper.java
+5
-4
xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml
...min/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml
+1
-1
xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobLogger.java
...core/src/main/java/com/xxl/job/core/log/XxlJobLogger.java
+13
-9
未找到文件。
doc/XXL-JOB官方文档.md
浏览文件 @
1aac3416
...
...
@@ -1217,6 +1217,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
-
12、脚本任务异常Log输出优化;
-
13、任务线程停止变量修饰符优化;
-
14、脚本任务Log文件流关闭优化;
-
15、任务报表成功、失败和进行中统计问题修复;
### TODO LIST
...
...
xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobFailMonitorHelper.java
浏览文件 @
1aac3416
...
...
@@ -56,21 +56,22 @@ public class JobFailMonitorHelper {
continue
;
}
if
(
IJobHandler
.
SUCCESS
.
getCode
()
==
log
.
getTriggerCode
()
&&
log
.
getHandleCode
()
==
0
)
{
// job running
JobFailMonitorHelper
.
monitor
(
jobLogId
);
logger
.
info
(
">>>>>>>>>>> job monitor, job running, JobLogId:{}"
,
jobLogId
);
}
else
if
(
IJobHandler
.
SUCCESS
.
getCode
()
==
log
.
getHandleCode
())
{
// job success, pass
logger
.
info
(
">>>>>>>>>>> job monitor, job success, JobLogId:{}"
,
jobLogId
);
}
else
if
(
IJobHandler
.
FAIL
.
getCode
()
==
log
.
getTriggerCode
()
}
else
/*
if (IJobHandler.FAIL.getCode() == log.getTriggerCode()
|| IJobHandler.FAIL.getCode() == log.getHandleCode()
||
IJobHandler
.
FAIL_RETRY
.
getCode
()
==
log
.
getHandleCode
()
)
{
|| IJobHandler.FAIL_RETRY.getCode() == log.getHandleCode() )
*/
{
// job fail,
failAlarm
(
log
);
logger
.
info
(
">>>>>>>>>>> job monitor, job fail, JobLogId:{}"
,
jobLogId
);
}
else
{
}
/*
else {
JobFailMonitorHelper.monitor(jobLogId);
logger.info(">>>>>>>>>>> job monitor, job status unknown, JobLogId:{}", jobLogId);
}
}
*/
}
}
...
...
xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml
浏览文件 @
1aac3416
...
...
@@ -172,7 +172,7 @@
SELECT
DATE_FORMAT(trigger_time,'%Y-%m-%d') triggerDay,
COUNT(handle_code) triggerDayCount,
SUM(CASE WHEN
handle_code = 0
then 1 else 0 end) as triggerDayCountRunning,
SUM(CASE WHEN
(trigger_code = 200 and handle_code = 0)
then 1 else 0 end) as triggerDayCountRunning,
SUM(CASE WHEN handle_code = 200 then 1 else 0 end) as triggerDayCountSuc
FROM XXL_JOB_QRTZ_TRIGGER_LOG
WHERE trigger_time BETWEEN #{from} and #{to}
...
...
xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobLogger.java
浏览文件 @
1aac3416
package
com.xxl.job.core.log
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
java.io.PrintWriter
;
import
java.io.StringWriter
;
import
java.text.MessageFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.helpers.FormattingTuple
;
import
org.slf4j.helpers.MessageFormatter
;
/**
* Created by xuxueli on 17/4/28.
*/
...
...
@@ -54,12 +55,15 @@ public class XxlJobLogger {
*/
public
static
void
log
(
String
appendLogPattern
,
Object
...
appendLogArguments
)
{
String
appendLog
=
appendLogPattern
;
if
(
appendLogArguments
!=
null
&&
appendLogArguments
.
length
>
0
)
{
appendLog
=
MessageFormat
.
format
(
appendLogPattern
,
appendLogArguments
);
}
FormattingTuple
ft
=
MessageFormatter
.
format
(
appendLogPattern
,
appendLogArguments
);
String
appendLog
=
ft
.
getMessage
();
StackTraceElement
callInfo
=
new
Throwable
().
getStackTrace
()[
1
];
// appendLog = appendLogPattern;
// if (appendLogArguments!=null && appendLogArguments.length>0) {
// appendLog = MessageFormat.format(appendLogPattern, appendLogArguments);
// }
logDetail
(
callInfo
,
appendLog
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录