diff --git a/backend/src/main/java/io/metersphere/api/exec/queue/ExecThreadPoolExecutor.java b/backend/src/main/java/io/metersphere/api/exec/queue/ExecThreadPoolExecutor.java index 2bc9621946..c6c4900240 100644 --- a/backend/src/main/java/io/metersphere/api/exec/queue/ExecThreadPoolExecutor.java +++ b/backend/src/main/java/io/metersphere/api/exec/queue/ExecThreadPoolExecutor.java @@ -109,7 +109,7 @@ public class ExecThreadPoolExecutor { threadPool.allowCoreThreadTimeOut(true); LoggerUtil.info("AllCoreThreads: " + threadPool.prestartAllCoreThreads()); } catch (Exception e) { - LoggerUtil.error("设置线程参数异常:" + e); + LoggerUtil.error("设置线程参数异常:", e); } } diff --git a/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioSerialService.java b/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioSerialService.java index cc546683e1..e48604bb72 100644 --- a/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioSerialService.java +++ b/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioSerialService.java @@ -134,7 +134,7 @@ public class ApiScenarioSerialService { ResultDTO dto = new ResultDTO(); BeanUtils.copyBean(dto, runRequest); CommonBeanFactory.getBean(ApiExecutionQueueService.class).queueNext(dto); - LoggerUtil.error("执行终止:" + e.getMessage()); + LoggerUtil.error("执行终止:", e); } } diff --git a/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java b/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java index b13e922e57..1a3f5b44b1 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java @@ -129,7 +129,7 @@ public class JMeterService { final Engine engine = EngineFactory.createApiEngine(request); engine.start(); } catch (Exception e) { - LoggerUtil.error("调用K8S执行请求[ " + request.getTestId() + " ] 失败:" + e.getMessage()); + LoggerUtil.error("调用K8S执行请求[ " + request.getTestId() + " ] 失败:", e); ApiScenarioReportService apiScenarioReportService = CommonBeanFactory.getBean(ApiScenarioReportService.class); apiScenarioReportService.delete(request.getReportId()); MSException.throwException(e.getMessage()); @@ -171,7 +171,7 @@ public class JMeterService { } catch (Exception e) { RemakeReportService remakeReportService = CommonBeanFactory.getBean(RemakeReportService.class); remakeReportService.remake(request); - LoggerUtil.error("发送请求[ " + request.getTestId() + " ] 执行失败:" + e.getMessage()); + LoggerUtil.error("发送请求[ " + request.getTestId() + " ] 执行失败:", e); LoggerUtil.error(e); } } diff --git a/backend/src/main/java/io/metersphere/api/jmeter/MsDebugListener.java b/backend/src/main/java/io/metersphere/api/jmeter/MsDebugListener.java index f7171e4515..3ef62c027d 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/MsDebugListener.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/MsDebugListener.java @@ -135,7 +135,7 @@ public class MsDebugListener extends AbstractListenerElement implements SampleLi LoggerUtil.debug("send. " + this.getName()); WebSocketUtils.sendMessageSingle(dto); } catch (Exception ex) { - LoggerUtil.error("消息推送失败:" + ex.getMessage()); + LoggerUtil.error("消息推送失败:" , ex); } } diff --git a/backend/src/main/java/io/metersphere/api/jmeter/MsKafkaListener.java b/backend/src/main/java/io/metersphere/api/jmeter/MsKafkaListener.java index 2d5e5f309e..2d719f5b62 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/MsKafkaListener.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/MsKafkaListener.java @@ -93,7 +93,7 @@ public class MsKafkaListener { }); } } catch (Exception e) { - LoggerUtil.error("KAFKA消费失败:" + e.getMessage()); + LoggerUtil.error("KAFKA消费失败:", e); } finally { ack.acknowledge(); } @@ -121,7 +121,7 @@ public class MsKafkaListener { return element; } } catch (Exception e) { - LoggerUtil.error("formatResult 格式化数据失败:" + e.getMessage()); + LoggerUtil.error("formatResult 格式化数据失败:", e); } return null; } diff --git a/backend/src/main/java/io/metersphere/api/service/ApiEnvironmentRunningParamService.java b/backend/src/main/java/io/metersphere/api/service/ApiEnvironmentRunningParamService.java index 692d873f69..058b71367f 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiEnvironmentRunningParamService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiEnvironmentRunningParamService.java @@ -118,7 +118,7 @@ public class ApiEnvironmentRunningParamService { } } catch (Exception ex) { - LoggerUtil.error("设置环境变量异常:" + ex.getMessage()); + LoggerUtil.error("设置环境变量异常", ex); } } diff --git a/backend/src/main/java/io/metersphere/websocket/c/to/c/WebSocketUtils.java b/backend/src/main/java/io/metersphere/websocket/c/to/c/WebSocketUtils.java index 18bbe21d97..c1702c673a 100644 --- a/backend/src/main/java/io/metersphere/websocket/c/to/c/WebSocketUtils.java +++ b/backend/src/main/java/io/metersphere/websocket/c/to/c/WebSocketUtils.java @@ -50,7 +50,7 @@ public class WebSocketUtils { WebSocketUtils.ONLINE_USER_SESSIONS.remove(("send." + reportId)); } } catch (Exception e) { - LoggerUtil.error("关闭socket失败:" + e.getMessage()); + LoggerUtil.error("关闭socket失败:", e); } } }