chore: 用例管理输出日志增加占位符

This commit is contained in:
guoyuqi 2024-02-21 18:49:52 +08:00 committed by 刘瑞斌
parent 52448dcb32
commit ea6dce1d7e
4 changed files with 10 additions and 10 deletions

View File

@ -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());
}
}

View File

@ -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.自定义字段

View File

@ -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;

View File

@ -125,7 +125,7 @@ public abstract class AbstractNoticeSender implements NoticeSender {
List<Receiver> 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()));