From 0d6499ab1817b1c4f580144f02cbbef6c760dc72 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Thu, 29 May 2025 11:21:06 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=B0=86=E5=8F=91?= =?UTF-8?q?=E9=80=81=E9=82=AE=E4=BB=B6=E9=80=9A=E7=9F=A5=E6=97=B6=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=89=BE=E5=88=B0=E6=94=B6=E4=BB=B6=E4=BA=BA=E6=97=B6?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E5=88=B0error.log=E6=97=A5=E5=BF=97=E7=A7=BB?= =?UTF-8?q?=E5=88=B0warn.log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1431772473032706]将发送邮件通知时没有找到收件人时输出到error.log日志移到warn.log http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1431772473032706 --- .../exception/runner/RunnerUrlIsNullException.java | 2 +- .../matrix/exception/MatrixViewSqlIrregularException.java | 4 ++-- .../framework/notify/handler/EmailNotifyHandler.java | 8 ++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/java/neatlogic/framework/exception/runner/RunnerUrlIsNullException.java b/src/main/java/neatlogic/framework/exception/runner/RunnerUrlIsNullException.java index 9eb53d95a..4becbc1da 100644 --- a/src/main/java/neatlogic/framework/exception/runner/RunnerUrlIsNullException.java +++ b/src/main/java/neatlogic/framework/exception/runner/RunnerUrlIsNullException.java @@ -19,6 +19,6 @@ import neatlogic.framework.exception.core.ApiRuntimeException; public class RunnerUrlIsNullException extends ApiRuntimeException { public RunnerUrlIsNullException(Long runnerId) { - super("exception.framework.runnerurlisnullexception", runnerId); + super("nfer.runnerurlisnullexception.runnerurlisnullexception", runnerId); } } diff --git a/src/main/java/neatlogic/framework/matrix/exception/MatrixViewSqlIrregularException.java b/src/main/java/neatlogic/framework/matrix/exception/MatrixViewSqlIrregularException.java index b35b0661b..662187741 100644 --- a/src/main/java/neatlogic/framework/matrix/exception/MatrixViewSqlIrregularException.java +++ b/src/main/java/neatlogic/framework/matrix/exception/MatrixViewSqlIrregularException.java @@ -21,10 +21,10 @@ public class MatrixViewSqlIrregularException extends ApiRuntimeException { private static final long serialVersionUID = -8248360500986046478L; public MatrixViewSqlIrregularException(Exception msg) { - super("sql 非法{0}", msg.getMessage()); + super("nfme.matrixviewsqlirregularexception.matrixviewsqlirregularexception", msg.getMessage()); } public MatrixViewSqlIrregularException() { - super("exception.framework.matrixviewsqlirregularexception.2"); + super("nfme.matrixviewsqlirregularexception.matrixviewsqlirregularexception_a"); } } diff --git a/src/main/java/neatlogic/module/framework/notify/handler/EmailNotifyHandler.java b/src/main/java/neatlogic/module/framework/notify/handler/EmailNotifyHandler.java index a547bffc0..749db32a1 100644 --- a/src/main/java/neatlogic/module/framework/notify/handler/EmailNotifyHandler.java +++ b/src/main/java/neatlogic/module/framework/notify/handler/EmailNotifyHandler.java @@ -59,7 +59,11 @@ public class EmailNotifyHandler extends NotifyHandlerBase { sendEmail(notifyVo); return true; } catch (Exception e) { - logger.error(e.getMessage(), e); + if (e instanceof NotifyNoReceiverException) { + logger.warn(e.getMessage(), e); + } else { + logger.error(e.getMessage(), e); + } if (!(e instanceof EmailServerNotFoundException)) { if (notifyVo.getIsSendExceptionNotify() == 1) { notifyVo.setIsSendExceptionNotify(0);// 防止循环调用NotifyPolicyUtil.execute方法 @@ -115,7 +119,7 @@ public class EmailNotifyHandler extends NotifyHandlerBase { if (StringUtils.isNotBlank(user.getEmail())) { toEmailSet.add(user.getEmail()); } else { - logger.error("接收对象用户:”{}({})”没有设置邮箱地址", user.getUserName(), user.getUserId()); + logger.warn("接收对象用户:”{}({})”没有设置邮箱地址", user.getUserName(), user.getUserId()); } } if (CollectionUtils.isEmpty(toEmailSet)) { -- Gitee