diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/file/MinioRepository.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/file/MinioRepository.java index aac8faf20d..ac3ee0499e 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/file/MinioRepository.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/file/MinioRepository.java @@ -50,7 +50,7 @@ public class MinioRepository implements FileRepository { try { Object serverUrl = minioConfig.get(ENDPOINT).toString(); if (ObjectUtils.isNotEmpty(serverUrl)) { - LogUtils.info("开始初始化MinIO插件。配置:", PluginUtils.toJSONString(minioConfig)); + LogUtils.info("开始初始化MinIO插件。配置:{}", PluginUtils.toJSONString(minioConfig)); // 创建 MinioClient 客户端 client = MinioClient.builder() .endpoint(minioConfig.get(ENDPOINT).toString()) diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/WebSocketUtils.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/WebSocketUtils.java index e9fe774ec2..35b4799ca9 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/WebSocketUtils.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/WebSocketUtils.java @@ -51,7 +51,7 @@ public class WebSocketUtils { WebSocketUtils.ONLINE_USER_SESSIONS.remove(reportId); } } catch (Exception e) { - LogUtils.error("关闭socket失败:", e); + LogUtils.error("关闭socket失败:{}", e); } } } diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/listener/DebugListener.java b/backend/services/api-test/src/main/java/io/metersphere/api/listener/DebugListener.java index bb54fdfaac..b25c622204 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/listener/DebugListener.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/listener/DebugListener.java @@ -20,13 +20,13 @@ public class DebugListener { @KafkaListener(id = DEBUG_CONSUME_ID, topics = KafkaTopicConstants.API_REPORT_DEBUG_TOPIC, groupId = DEBUG_CONSUME_ID + "_" + "${random.uuid}") public void debugConsume(ConsumerRecord record) { try { - LogUtils.info("接收到执行结果:", record.key()); + LogUtils.info("接收到执行结果:{}", record.key()); if (ObjectUtils.isNotEmpty(record.value()) && WebSocketUtils.has(record.key().toString())) { SocketMsgDTO dto = JSON.parseObject(record.value(), SocketMsgDTO.class); WebSocketUtils.sendMessageSingle(dto); } } catch (Exception e) { - LogUtils.error("调试消息推送失败:", e); + LogUtils.error("调试消息推送失败:{}", e); } } } diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/listener/MessageListener.java b/backend/services/api-test/src/main/java/io/metersphere/api/listener/MessageListener.java index e2b6981f6b..92dd0cc269 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/listener/MessageListener.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/listener/MessageListener.java @@ -32,7 +32,7 @@ public class MessageListener { @KafkaListener(id = MESSAGE_CONSUME_ID, topics = KafkaTopicConstants.API_REPORT_TASK_TOPIC, groupId = MESSAGE_CONSUME_ID) public void messageConsume(ConsumerRecord record) { try { - LogUtils.info("接收到发送通知信息:", record.key()); + LogUtils.info("接收到发送通知信息:{}", record.key()); if (ObjectUtils.isNotEmpty(record.value())) { ApiNoticeDTO dto = JSON.parseObject(record.value(), ApiNoticeDTO.class); @@ -40,7 +40,7 @@ public class MessageListener { if (!StringUtils.equalsIgnoreCase(dto.getReportType(), ApiReportType.INTEGRATED.name())) { apiReportSendNoticeService.sendNotice(dto); // TODO 通知测试计划处理后续 - LogUtils.info("发送通知给测试计划:", record.key()); + LogUtils.info("发送通知给测试计划:{}", record.key()); apiEventSource.fireEvent(ApplicationScope.API_TEST, record.value()); } @@ -50,7 +50,7 @@ public class MessageListener { } } catch (Exception e) { - LogUtils.error("接收到发送通知信息:", e); + LogUtils.error("接收到发送通知信息:{}", e); } } } diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/ApiPluginChangeService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/ApiPluginChangeService.java index 3ac2aedf90..0c4ae386b8 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/ApiPluginChangeService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/ApiPluginChangeService.java @@ -40,7 +40,7 @@ public class ApiPluginChangeService implements PluginChangeService { .forEach(item -> JmeterElementConverterRegister.register((Class>) item)); } } catch (Exception e) { - LogUtils.error("注册接口插件实现类失败:", e); + LogUtils.error("注册接口插件实现类失败:{}", e); } } } diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/log/aspect/OperationLogAspect.java b/backend/services/system-setting/src/main/java/io/metersphere/system/log/aspect/OperationLogAspect.java index c44134d59e..0396ef992b 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/log/aspect/OperationLogAspect.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/log/aspect/OperationLogAspect.java @@ -270,7 +270,7 @@ public class OperationLogAspect { save(result); } } catch (Exception e) { - LogUtils.error("操作日志写入异常:", e); + LogUtils.error("操作日志写入异常:{}", e); } finally { localUser.remove(); beforeValues.remove();