From 1d2a893707e9ff1d854c5b89d99615a96909c0c0 Mon Sep 17 00:00:00 2001 From: xuxueli <931591021@qq.com> Date: Wed, 9 Jan 2019 15:01:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=95=E5=B1=82Log=E8=B0=83=E4=BC=98?= =?UTF-8?q?=EF=BC=8C=E5=BA=94=E7=94=A8=E6=AD=A3=E5=B8=B8=E7=BB=88=E6=AD=A2?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=BC=82=E5=B8=B8=E6=A0=88=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=89=93=E5=8D=B0=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/XXL-JOB官方文档.md | 1 + .../xxl/job/admin/core/thread/JobFailMonitorHelper.java | 8 ++++++-- .../job/admin/core/thread/JobRegistryMonitorHelper.java | 9 +++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/doc/XXL-JOB官方文档.md b/doc/XXL-JOB官方文档.md index b9c17dca..9d90b3b0 100644 --- a/doc/XXL-JOB官方文档.md +++ b/doc/XXL-JOB官方文档.md @@ -1398,6 +1398,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段 - 3、记住密码功能优化,选中时永久记住;非选中时关闭浏览器即登出; - 4、项目依赖升级至较新稳定版本,如spring、jackson、groovy、xxl-rpc等等; - 5、精简项目,取消第三方依赖,如 commons-collections4 ; +- 6、底层Log调优,应用正常终止取消异常栈信息打印; - [迭代中]注册中心优化,实时性注册发现:心跳注册间隔10s,refresh失败则首次注册并立即更新注册信息,心跳类似;30s过期销毁; - [迭代中]脚本任务,支持数据参数,新版本仅支持单参数不支持需要兼容; - [迭代中]提供执行器Docker镜像; diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobFailMonitorHelper.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobFailMonitorHelper.java index acea99fc..de96c2be 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobFailMonitorHelper.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobFailMonitorHelper.java @@ -87,10 +87,14 @@ public class JobFailMonitorHelper { TimeUnit.SECONDS.sleep(10); } catch (Exception e) { - logger.error("job monitor error:{}", e); + if (!toStop) { + logger.error(">>>>>>>>>>> xxl-job, job fail monitor thread error:{}", e); + } } } + logger.warn(">>>>>>>>>>> xxl-job, job fail monitor thread stop"); + } }); monitorThread.setDaemon(true); @@ -178,7 +182,7 @@ public class JobFailMonitorHelper { XxlJobAdminConfig.getAdminConfig().getMailSender().send(mimeMessage); } catch (Exception e) { - logger.error(">>>>>>>>>>> job monitor alarm email send error, JobLogId:{}", jobLog.getId(), e); + logger.error(">>>>>>>>>>> xxl-job, job fail alarm email send error, JobLogId:{}", jobLog.getId(), e); alarmResult = false; } diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobRegistryMonitorHelper.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobRegistryMonitorHelper.java index 3856c991..0742b972 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobRegistryMonitorHelper.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobRegistryMonitorHelper.java @@ -74,14 +74,19 @@ public class JobRegistryMonitorHelper { } } } catch (Exception e) { - logger.error("job registry instance error:{}", e); + if (!toStop) { + logger.error(">>>>>>>>>>> xxl-job, job registry monitor thread error:{}", e); + } } try { TimeUnit.SECONDS.sleep(RegistryConfig.BEAT_TIMEOUT); } catch (InterruptedException e) { - logger.error("job registry instance error:{}", e); + if (!toStop) { + logger.error(">>>>>>>>>>> xxl-job, job registry monitor thread error:{}", e); + } } } + logger.warn(">>>>>>>>>>> xxl-job, job registry monitor thread stop"); } }); registryThread.setDaemon(true);