refactor(接口测试): 优化部分日志输出
This commit is contained in:
parent
35903fdb33
commit
db5c5e8cae
|
@ -109,7 +109,7 @@ public class ExecThreadPoolExecutor {
|
|||
threadPool.allowCoreThreadTimeOut(true);
|
||||
LoggerUtil.info("AllCoreThreads: " + threadPool.prestartAllCoreThreads());
|
||||
} catch (Exception e) {
|
||||
LoggerUtil.error("设置线程参数异常:" + e);
|
||||
LoggerUtil.error("设置线程参数异常:", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ public class ApiEnvironmentRunningParamService {
|
|||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
LoggerUtil.error("设置环境变量异常:" + ex.getMessage());
|
||||
LoggerUtil.error("设置环境变量异常", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue