From ea6dce1d7ed368af76a48a8d5ee7029401340a02 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Wed, 21 Feb 2024 18:49:52 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=94=A8=E4=BE=8B=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E6=97=A5=E5=BF=97=E5=A2=9E=E5=8A=A0=E5=8D=A0?= =?UTF-8?q?=E4=BD=8D=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../functional/provider/CaseReviewCaseProvider.java | 12 ++++++------ .../service/DeleteFunctionalCaseService.java | 2 +- .../service/FunctionalCaseAttachmentService.java | 4 ++-- .../system/notice/sender/AbstractNoticeSender.java | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/provider/CaseReviewCaseProvider.java b/backend/services/case-management/src/main/java/io/metersphere/functional/provider/CaseReviewCaseProvider.java index 366ee48a0e..90789dc092 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/provider/CaseReviewCaseProvider.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/provider/CaseReviewCaseProvider.java @@ -86,7 +86,7 @@ public class CaseReviewCaseProvider implements BaseCaseProvider { mapCount.put(UN_REVIEWED_COUNT,i+caseIdList.size()); updateCaseReview(reviewId, caseCount, mapCount, paramMap.get(CaseEvent.Param.USER_ID).toString()); } catch (Exception e) { - LogUtils.error(CaseEvent.Event.ASSOCIATE + "事件更新失败", e.getMessage()); + LogUtils.error(CaseEvent.Event.ASSOCIATE + "事件更新失败:{}", e.getMessage()); } } @@ -116,7 +116,7 @@ public class CaseReviewCaseProvider implements BaseCaseProvider { //检查更新用例的评审状态。如果用例没有任何评审关联,就置为未评审, 否则置为更新建时间最晚的那个 updateCaseStatus(caseIdList); } catch (Exception e) { - LogUtils.error(CaseEvent.Event.DISASSOCIATE + "事件更新失败", e.getMessage()); + LogUtils.error(CaseEvent.Event.DISASSOCIATE + "事件更新失败:{}", e.getMessage()); } } @@ -159,7 +159,7 @@ public class CaseReviewCaseProvider implements BaseCaseProvider { } startUpdateCaseReview(paramMap, caseIdList); } catch (Exception e) { - LogUtils.error(CaseEvent.Event.DELETE_FUNCTIONAL_CASE + "事件更新失败", e.getMessage()); + LogUtils.error(CaseEvent.Event.DELETE_FUNCTIONAL_CASE + "事件更新失败:{}", e.getMessage()); } } @@ -184,7 +184,7 @@ public class CaseReviewCaseProvider implements BaseCaseProvider { caseReviewFunctionalCaseExample.createCriteria().andCaseIdIn(caseIdList); caseReviewFunctionalCaseMapper.deleteByExample(caseReviewFunctionalCaseExample); } catch (Exception e) { - LogUtils.error(CaseEvent.Event.DELETE_TRASH_FUNCTIONAL_CASE + "事件更新失败", e.getMessage()); + LogUtils.error(CaseEvent.Event.DELETE_TRASH_FUNCTIONAL_CASE + "事件更新失败:{}", e.getMessage()); } } @@ -225,7 +225,7 @@ public class CaseReviewCaseProvider implements BaseCaseProvider { updateCaseReview(reviewId, caseReviewFunctionalCaseList.size(), caseCountMap, paramMap.get(CaseEvent.Param.USER_ID).toString()); }); } catch (Exception e) { - LogUtils.error(CaseEvent.Event.RECOVER_FUNCTIONAL_CASE + "事件更新失败", e.getMessage()); + LogUtils.error(CaseEvent.Event.RECOVER_FUNCTIONAL_CASE + "事件更新失败:{}", e.getMessage()); } } @@ -256,7 +256,7 @@ public class CaseReviewCaseProvider implements BaseCaseProvider { updateCaseReview(reviewId, caseReviewFunctionalCases.size()+caseIdList.size(), caseCountMap, paramMap.get(CaseEvent.Param.USER_ID).toString()); } catch (Exception e) { - LogUtils.error(CaseEvent.Event.REVIEW_FUNCTIONAL_CASE + "事件更新失败", e.getMessage()); + LogUtils.error(CaseEvent.Event.REVIEW_FUNCTIONAL_CASE + "事件更新失败:{}", e.getMessage()); } } diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/DeleteFunctionalCaseService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/DeleteFunctionalCaseService.java index 9f6ad92182..4460ff29ae 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/DeleteFunctionalCaseService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/DeleteFunctionalCaseService.java @@ -72,7 +72,7 @@ public class DeleteFunctionalCaseService { request.setFolder(DefaultRepositoryDir.getFunctionalCasePreviewDir(projectId, id)); FileCenter.getDefaultRepository().deleteFolder(request); } catch (Exception e) { - LogUtils.error("彻底删除功能用例,文件删除失败",e); + LogUtils.error("彻底删除功能用例,文件删除失败:{}",e); } } //10.自定义字段 diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseAttachmentService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseAttachmentService.java index 7f8f4eab26..2a7ecf33a0 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseAttachmentService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseAttachmentService.java @@ -542,7 +542,7 @@ public class FunctionalCaseAttachmentService { try { previewImg = fileService.download(previewRequest); } catch (Exception e) { - LogUtils.error("获取预览图失败", e); + LogUtils.error("获取预览图失败:{}", e); } if (previewImg == null || previewImg.length == 0) { @@ -554,7 +554,7 @@ public class FunctionalCaseAttachmentService { } return previewImg; } catch (Exception e) { - LogUtils.error("获取预览图失败", e); + LogUtils.error("获取预览图失败:{}", e); } } return previewImg; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/AbstractNoticeSender.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/AbstractNoticeSender.java index 3a31b792d3..ee6729b430 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/AbstractNoticeSender.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/AbstractNoticeSender.java @@ -125,7 +125,7 @@ public abstract class AbstractNoticeSender implements NoticeSender { List follows = handleFollows(messageDetail, noticeModel); toUsers.addAll(follows); } catch (Exception e) { - LogUtils.error("查询关注人失败: ", e); + LogUtils.error("查询关注人失败:{}", e); } } default -> toUsers.add(new Receiver(userId, NotificationConstants.Type.MENTIONED_ME.name()));