refactor: 错误日志输出到日志文件

This commit is contained in:
chenjianxing 2021-11-23 10:05:38 +08:00 committed by jianxing
parent 123a88b578
commit 327d307ed2
53 changed files with 116 additions and 107 deletions

View File

@ -17,10 +17,7 @@ import io.metersphere.base.domain.ApiScenarioWithBLOBs;
import io.metersphere.base.domain.ApiTest; import io.metersphere.base.domain.ApiTest;
import io.metersphere.base.domain.Schedule; import io.metersphere.base.domain.Schedule;
import io.metersphere.commons.constants.NoticeConstants; import io.metersphere.commons.constants.NoticeConstants;
import io.metersphere.commons.utils.CronUtils; import io.metersphere.commons.utils.*;
import io.metersphere.commons.utils.PageUtils;
import io.metersphere.commons.utils.Pager;
import io.metersphere.commons.utils.SessionUtils;
import io.metersphere.controller.request.BaseQueryRequest; import io.metersphere.controller.request.BaseQueryRequest;
import io.metersphere.controller.request.QueryScheduleRequest; import io.metersphere.controller.request.QueryScheduleRequest;
import io.metersphere.controller.request.ScheduleRequest; import io.metersphere.controller.request.ScheduleRequest;
@ -288,7 +285,7 @@ public class APITestController {
returnStr = df.format(coverageRageNumber) + "%"; returnStr = df.format(coverageRageNumber) + "%";
} }
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); LogUtil.error(e);
} }
return returnStr; return returnStr;
} }
@ -308,7 +305,7 @@ public class APITestController {
DecimalFormat df = new DecimalFormat("0.0"); DecimalFormat df = new DecimalFormat("0.0");
returnStr = df.format(intetfaceCoverageRageNumber) + "%"; returnStr = df.format(intetfaceCoverageRageNumber) + "%";
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); LogUtil.error(e);
} }
return returnStr; return returnStr;
} }

View File

@ -8,6 +8,7 @@ import io.metersphere.api.service.ApiDefinitionService;
import io.metersphere.api.service.ShareInfoService; import io.metersphere.api.service.ShareInfoService;
import io.metersphere.base.domain.ApiDefinitionWithBLOBs; import io.metersphere.base.domain.ApiDefinitionWithBLOBs;
import io.metersphere.base.domain.ShareInfo; import io.metersphere.base.domain.ShareInfo;
import io.metersphere.commons.utils.LogUtil;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -68,7 +69,7 @@ public class ShareInfoController {
try{ try{
returnDTO = shareInfoService.conversionModelToDTO(apiModel); returnDTO = shareInfoService.conversionModelToDTO(apiModel);
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); LogUtil.error(e);
} }
returnDTO.setSelectedFlag(true); returnDTO.setSelectedFlag(true);
return returnDTO; return returnDTO;

View File

@ -1,5 +1,6 @@
package io.metersphere.api.dto.automation; package io.metersphere.api.dto.automation;
import io.metersphere.commons.utils.LogUtil;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
@ -123,7 +124,7 @@ public class EsbDataStruct {
element.addAttribute("attr", attrString); element.addAttribute("attr", attrString);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
if (element != null) { if (element != null) {
@ -162,7 +163,7 @@ public class EsbDataStruct {
element.addAttribute("attr", attrString); element.addAttribute("attr", attrString);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
if (element != null) { if (element != null) {

View File

@ -1,5 +1,6 @@
package io.metersphere.api.dto.automation; package io.metersphere.api.dto.automation;
import io.metersphere.commons.utils.LogUtil;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
@ -123,7 +124,7 @@ public class TcpTreeTableDataStruct {
element.addAttribute("attr", attrString); element.addAttribute("attr", attrString);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
if (element != null) { if (element != null) {
@ -162,7 +163,7 @@ public class TcpTreeTableDataStruct {
element.addAttribute("attr", attrString); element.addAttribute("attr", attrString);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
if (element != null) { if (element != null) {

View File

@ -2,6 +2,7 @@ package io.metersphere.api.dto.automation.parse;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import io.metersphere.api.dto.automation.EsbDataStruct; import io.metersphere.api.dto.automation.EsbDataStruct;
import io.metersphere.commons.utils.LogUtil;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.dom4j.Document; import org.dom4j.Document;
import org.dom4j.DocumentHelper; import org.dom4j.DocumentHelper;
@ -55,11 +56,11 @@ public class EsbDataParser {
xmlString = stringWriter.toString(); xmlString = stringWriter.toString();
xmlWriter.close(); xmlWriter.close();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
if (StringUtils.isEmpty(xmlString)) { if (StringUtils.isEmpty(xmlString)) {
xmlString = ""; xmlString = "";

View File

@ -106,7 +106,7 @@ public class MsJmeterParser extends ApiImportAbstractParser<ScenarioImport> {
scenarioImport.setProjectId(request.getProjectId()); scenarioImport.setProjectId(request.getProjectId());
return scenarioImport; return scenarioImport;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
MSException.throwException("当前JMX版本不兼容"); MSException.throwException("当前JMX版本不兼容");
} }
return null; return null;
@ -315,7 +315,7 @@ public class MsJmeterParser extends ApiImportAbstractParser<ScenarioImport> {
body.getBinary().add(new KeyValue()); body.getBinary().add(new KeyValue());
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }
@ -643,7 +643,7 @@ public class MsJmeterParser extends ApiImportAbstractParser<ScenarioImport> {
SaveService.saveElement(obj, baos); SaveService.saveElement(obj, baos);
return baos.toString(); return baos.toString();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
LogUtil.warn("HashTree error, can't log jmx scenarioDefinition"); LogUtil.warn("HashTree error, can't log jmx scenarioDefinition");
} }
return null; return null;

View File

@ -1,6 +1,7 @@
package io.metersphere.api.dto.automation.parse; package io.metersphere.api.dto.automation.parse;
import io.metersphere.api.dto.automation.TcpTreeTableDataStruct; import io.metersphere.api.dto.automation.TcpTreeTableDataStruct;
import io.metersphere.commons.utils.LogUtil;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.dom4j.Document; import org.dom4j.Document;
import org.dom4j.DocumentHelper; import org.dom4j.DocumentHelper;
@ -62,11 +63,11 @@ public class TcpTreeTableDataParser {
xmlString = stringWriter.toString(); xmlString = stringWriter.toString();
xmlWriter.close(); xmlWriter.close();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); LogUtil.error(e);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
if (StringUtils.isEmpty(xmlString)) { if (StringUtils.isEmpty(xmlString)) {
xmlString = ""; xmlString = "";

View File

@ -16,6 +16,7 @@ import io.metersphere.base.domain.ApiDefinitionWithBLOBs;
import io.metersphere.base.domain.ApiModule; import io.metersphere.base.domain.ApiModule;
import io.metersphere.base.domain.EsbApiParamsWithBLOBs; import io.metersphere.base.domain.EsbApiParamsWithBLOBs;
import io.metersphere.commons.utils.CommonBeanFactory; import io.metersphere.commons.utils.CommonBeanFactory;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.commons.utils.SessionUtils; import io.metersphere.commons.utils.SessionUtils;
import io.swagger.models.Model; import io.swagger.models.Model;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -63,7 +64,7 @@ public class ESBParser extends EsbAbstractParser {
wb.write(out); wb.write(out);
wb.close(); wb.close();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); LogUtil.error(e);
} finally { } finally {
if (out != null) { if (out != null) {
try { try {
@ -524,7 +525,7 @@ public class ESBParser extends EsbAbstractParser {
} catch (IllegalStateException e2) { } catch (IllegalStateException e2) {
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
break; break;
default: default:

View File

@ -16,6 +16,7 @@ import io.metersphere.api.dto.definition.request.extract.MsExtractRegex;
import io.metersphere.api.dto.definition.request.extract.MsExtractXPath; import io.metersphere.api.dto.definition.request.extract.MsExtractXPath;
import io.metersphere.api.dto.definition.request.processors.post.MsJSR223PostProcessor; import io.metersphere.api.dto.definition.request.processors.post.MsJSR223PostProcessor;
import io.metersphere.api.dto.definition.request.processors.pre.MsJSR223PreProcessor; import io.metersphere.api.dto.definition.request.processors.pre.MsJSR223PreProcessor;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.plugin.core.MsTestElement; import io.metersphere.plugin.core.MsTestElement;
import io.metersphere.api.dto.definition.request.sampler.MsDubboSampler; import io.metersphere.api.dto.definition.request.sampler.MsDubboSampler;
import io.metersphere.api.dto.definition.request.sampler.MsHTTPSamplerProxy; import io.metersphere.api.dto.definition.request.sampler.MsHTTPSamplerProxy;
@ -116,7 +117,7 @@ public class JmeterDefinitionParser extends ApiImportAbstractParser<ApiDefinitio
apiImport.setCases(definitionCases); apiImport.setCases(definitionCases);
return apiImport; return apiImport;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
MSException.throwException("当前JMX版本不兼容"); MSException.throwException("当前JMX版本不兼容");
} }
return null; return null;
@ -703,7 +704,7 @@ public class JmeterDefinitionParser extends ApiImportAbstractParser<ApiDefinitio
body.getBinary().add(new KeyValue()); body.getBinary().add(new KeyValue());
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }

View File

@ -3,6 +3,7 @@ package io.metersphere.api.dto.definition.request.auth;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.annotation.JSONType; import com.alibaba.fastjson.annotation.JSONType;
import io.metersphere.api.dto.definition.request.ParameterConfig; import io.metersphere.api.dto.definition.request.ParameterConfig;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.plugin.core.MsParameter; import io.metersphere.plugin.core.MsParameter;
import io.metersphere.plugin.core.MsTestElement; import io.metersphere.plugin.core.MsTestElement;
import lombok.Data; import lombok.Data;
@ -95,7 +96,7 @@ public class MsAuthManager extends MsTestElement {
authManager.addAuth(auth); authManager.addAuth(auth);
tree.add(authManager); tree.add(authManager);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }
} }

View File

@ -191,7 +191,7 @@ public class MockApiUtils {
returnObj.put(key, values); returnObj.put(key, values);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }
return returnObj; return returnObj;
@ -480,7 +480,7 @@ public class MockApiUtils {
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return returnJson; return returnJson;
} else if (StringUtils.startsWithIgnoreCase(request.getContentType(),"text/xml")) { } else if (StringUtils.startsWithIgnoreCase(request.getContentType(),"text/xml")) {
@ -560,7 +560,7 @@ public class MockApiUtils {
inputStream.close(); inputStream.close();
result = new String(outSteam.toByteArray(), "UTF-8"); result = new String(outSteam.toByteArray(), "UTF-8");
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return result; return result;
} }

View File

@ -50,7 +50,6 @@ public class MsKafkaListener {
return element; return element;
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
LogUtil.error(e); LogUtil.error(e);
} }
return null; return null;

View File

@ -105,7 +105,7 @@ public class MsResultCollector extends AbstractListenerElement implements Sample
client.close(); client.close();
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }
@ -120,7 +120,7 @@ public class MsResultCollector extends AbstractListenerElement implements Sample
client = new MsWebSocketClient("ws://127.0.0.1:8081/ws/" + "send." + this.getName()); client = new MsWebSocketClient("ws://127.0.0.1:8081/ws/" + "send." + this.getName());
client.connect(); client.connect();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }

View File

@ -516,7 +516,7 @@ public class APITestService {
} }
jmxString = root.asXML(); jmxString = root.asXML();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
if (!jmxString.startsWith("<?xml version=\"1.0\" encoding=\"UTF-8\"?>")) { if (!jmxString.startsWith("<?xml version=\"1.0\" encoding=\"UTF-8\"?>")) {
@ -538,7 +538,7 @@ public class APITestService {
fileMetadataList.add(fileMetadata); fileMetadataList.add(fileMetadata);
attachmentFiles.put(fileMetadata.getId(),fileMetadata.getName()); attachmentFiles.put(fileMetadata.getId(),fileMetadata.getName());
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); LogUtil.error(e);
} }
} }
} }

View File

@ -953,7 +953,7 @@ public class ApiAutomationService {
} }
} }
} catch (JsonProcessingException e) { } catch (JsonProcessingException e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }
@ -1040,7 +1040,7 @@ public class ApiAutomationService {
scenario.setVariables(variables); scenario.setVariables(variables);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
LogUtil.error(e); LogUtil.error(e);
} }
} }
@ -2625,7 +2625,7 @@ public class ApiAutomationService {
urlList = new ArrayList<>(unionList); urlList = new ArrayList<>(unionList);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return urlList; return urlList;
} }

View File

@ -6,6 +6,7 @@ import io.metersphere.base.domain.ApiScenarioReferenceId;
import io.metersphere.base.domain.ApiScenarioReferenceIdExample; import io.metersphere.base.domain.ApiScenarioReferenceIdExample;
import io.metersphere.base.domain.ApiScenarioWithBLOBs; import io.metersphere.base.domain.ApiScenarioWithBLOBs;
import io.metersphere.base.mapper.ApiScenarioReferenceIdMapper; import io.metersphere.base.mapper.ApiScenarioReferenceIdMapper;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.commons.utils.SessionUtils; import io.metersphere.commons.utils.SessionUtils;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
@ -91,7 +92,7 @@ public class ApiScenarioReferenceIdService {
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
if(MapUtils.isNotEmpty(refreceIdDic)){ if(MapUtils.isNotEmpty(refreceIdDic)){
for (ApiScenarioReferenceId model:refreceIdDic.values()) { for (ApiScenarioReferenceId model:refreceIdDic.values()) {
@ -106,7 +107,7 @@ public class ApiScenarioReferenceIdService {
try{ try{
apiScenarioReferenceIdMapper.insert(saveItem); apiScenarioReferenceIdMapper.insert(saveItem);
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); LogUtil.error(e);
} }
} }
} }

View File

@ -707,7 +707,6 @@ public class ApiTestCaseService {
req.setPath(path); req.setPath(path);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
LogUtil.error(e); LogUtil.error(e);
} }
String requestStr = JSON.toJSONString(req); String requestStr = JSON.toJSONString(req);

View File

@ -13,6 +13,7 @@ import io.metersphere.base.mapper.ApiTestEnvironmentMapper;
import io.metersphere.commons.exception.MSException; import io.metersphere.commons.exception.MSException;
import io.metersphere.commons.utils.CommonBeanFactory; import io.metersphere.commons.utils.CommonBeanFactory;
import io.metersphere.commons.utils.FileUtils; import io.metersphere.commons.utils.FileUtils;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.commons.utils.SessionUtils; import io.metersphere.commons.utils.SessionUtils;
import io.metersphere.controller.request.EnvironmentRequest; import io.metersphere.controller.request.EnvironmentRequest;
import io.metersphere.dto.BaseSystemConfigDTO; import io.metersphere.dto.BaseSystemConfigDTO;
@ -238,7 +239,7 @@ public class ApiTestEnvironmentService {
} }
} catch (Exception e) { } catch (Exception e) {
needUpdate = true; needUpdate = true;
e.printStackTrace(); LogUtil.error(e);
} }
} }
if (needUpdate) { if (needUpdate) {
@ -431,7 +432,7 @@ public class ApiTestEnvironmentService {
} }
} }
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); LogUtil.error(e);
} }
} }
return returnStr; return returnStr;

View File

@ -6,6 +6,7 @@ import io.metersphere.api.dto.automation.EsbDataStruct;
import io.metersphere.api.dto.automation.SaveApiScenarioRequest; import io.metersphere.api.dto.automation.SaveApiScenarioRequest;
import io.metersphere.api.dto.automation.parse.EsbDataParser; import io.metersphere.api.dto.automation.parse.EsbDataParser;
import io.metersphere.api.dto.definition.*; import io.metersphere.api.dto.definition.*;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.plugin.core.MsTestElement; import io.metersphere.plugin.core.MsTestElement;
import io.metersphere.api.dto.definition.request.MsTestPlan; import io.metersphere.api.dto.definition.request.MsTestPlan;
import io.metersphere.api.dto.definition.request.sampler.MsTCPSampler; import io.metersphere.api.dto.definition.request.sampler.MsTCPSampler;
@ -220,7 +221,7 @@ public class EsbApiParamService {
//更新EsbApiParams类 //更新EsbApiParams类
// EsbApiParamsWithBLOBs esbApiParams = this.createEsbApiParam(request.getId(), request.getEsbDataStruct(), request.getBackEsbDataStruct(), request.getBackScript()); // EsbApiParamsWithBLOBs esbApiParams = this.createEsbApiParam(request.getId(), request.getEsbDataStruct(), request.getBackEsbDataStruct(), request.getBackScript());
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return request; return request;
} }
@ -239,7 +240,7 @@ public class EsbApiParamService {
//更新EsbApiParams类 //更新EsbApiParams类
EsbApiParamsWithBLOBs esbApiParams = this.createEsbApiParam(request.getId(), request.getEsbDataStruct(), request.getBackEsbDataStruct(), request.getBackScript()); EsbApiParamsWithBLOBs esbApiParams = this.createEsbApiParam(request.getId(), request.getEsbDataStruct(), request.getBackEsbDataStruct(), request.getBackScript());
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return request; return request;
} }
@ -276,7 +277,7 @@ public class EsbApiParamService {
// //更新EsbApiParams类 // //更新EsbApiParams类
// EsbApiParamsWithBLOBs esbApiParams = this.createEsbApiParam(request.getId(), request.getEsbDataStruct(), request.getBackEsbDataStruct(), request.getBackScript()); // EsbApiParamsWithBLOBs esbApiParams = this.createEsbApiParam(request.getId(), request.getEsbDataStruct(), request.getBackEsbDataStruct(), request.getBackScript());
// } catch (Exception e) { // } catch (Exception e) {
// e.printStackTrace(); // LogUtil.error(e);
// } // }
// return request; // return request;
// } // }
@ -307,7 +308,7 @@ public class EsbApiParamService {
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return keyValueList; return keyValueList;
} }
@ -336,7 +337,7 @@ public class EsbApiParamService {
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return keyValueList; return keyValueList;
} }
@ -364,7 +365,7 @@ public class EsbApiParamService {
//更新EsbApiParams类 //更新EsbApiParams类
EsbApiParamsWithBLOBs esbApiParams = this.createEsbApiParam(request.getId(), request.getEsbDataStruct(), request.getBackEsbDataStruct(), request.getBackEsbDataStruct()); EsbApiParamsWithBLOBs esbApiParams = this.createEsbApiParam(request.getId(), request.getEsbDataStruct(), request.getBackEsbDataStruct(), request.getBackEsbDataStruct());
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return request; return request;
} }
@ -377,7 +378,7 @@ public class EsbApiParamService {
tcpSampler.setParameters(keyValueList); tcpSampler.setParameters(keyValueList);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }
@ -422,7 +423,7 @@ public class EsbApiParamService {
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return request; return request;
} }

View File

@ -8,6 +8,7 @@ import io.metersphere.api.dto.SaveHistoricalDataUpgrade;
import io.metersphere.api.dto.automation.ScenarioStatus; import io.metersphere.api.dto.automation.ScenarioStatus;
import io.metersphere.api.dto.datacount.ApiMethodUrlDTO; import io.metersphere.api.dto.datacount.ApiMethodUrlDTO;
import io.metersphere.api.dto.definition.request.MsScenario; import io.metersphere.api.dto.definition.request.MsScenario;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.plugin.core.MsTestElement; import io.metersphere.plugin.core.MsTestElement;
import io.metersphere.api.dto.definition.request.assertions.MsAssertionDuration; import io.metersphere.api.dto.definition.request.assertions.MsAssertionDuration;
import io.metersphere.api.dto.definition.request.assertions.MsAssertions; import io.metersphere.api.dto.definition.request.assertions.MsAssertions;
@ -320,7 +321,7 @@ public class HistoricalDataUpgradeService {
FileChannel outChannel = new FileOutputStream(new File(newPath)).getChannel();) { FileChannel outChannel = new FileOutputStream(new File(newPath)).getChannel();) {
inChannel.transferTo(0, inChannel.size(), outChannel); inChannel.transferTo(0, inChannel.size(), outChannel);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }

View File

@ -346,7 +346,7 @@ public class MockConfigService {
break; break;
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }
return returnModel; return returnModel;
@ -725,7 +725,7 @@ public class MockConfigService {
break; break;
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }
return returnModel; return returnModel;
@ -804,7 +804,7 @@ public class MockConfigService {
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return returnStr; return returnStr;
} }
@ -937,7 +937,7 @@ public class MockConfigService {
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return returnStr; return returnStr;
} }

View File

@ -13,6 +13,7 @@ import io.metersphere.commons.exception.MSException;
import io.metersphere.commons.json.JSONSchemaGenerator; import io.metersphere.commons.json.JSONSchemaGenerator;
import io.metersphere.commons.utils.BeanUtils; import io.metersphere.commons.utils.BeanUtils;
import io.metersphere.commons.utils.CommonBeanFactory; import io.metersphere.commons.utils.CommonBeanFactory;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.commons.utils.SessionUtils; import io.metersphere.commons.utils.SessionUtils;
import io.metersphere.track.service.TestPlanApiCaseService; import io.metersphere.track.service.TestPlanApiCaseService;
import io.metersphere.track.service.TestPlanScenarioCaseService; import io.metersphere.track.service.TestPlanScenarioCaseService;
@ -73,7 +74,7 @@ public class ShareInfoService {
shareApiIdList.add(apiId); shareApiIdList.add(apiId);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }
return shareApiIdList; return shareApiIdList;

View File

@ -3,6 +3,7 @@ package io.metersphere.api.service;
import io.metersphere.api.dto.automation.TcpTreeTableDataStruct; import io.metersphere.api.dto.automation.TcpTreeTableDataStruct;
import io.metersphere.api.dto.automation.parse.TcpTreeTableDataParser; import io.metersphere.api.dto.automation.parse.TcpTreeTableDataParser;
import io.metersphere.api.dto.definition.SaveApiDefinitionRequest; import io.metersphere.api.dto.definition.SaveApiDefinitionRequest;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.plugin.core.MsTestElement; import io.metersphere.plugin.core.MsTestElement;
import io.metersphere.api.dto.definition.request.sampler.MsTCPSampler; import io.metersphere.api.dto.definition.request.sampler.MsTCPSampler;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -49,7 +50,7 @@ public class TcpApiParamService {
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return tcpSampler; return tcpSampler;
} }

View File

@ -144,7 +144,6 @@ public class TestResultService {
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
LogUtil.error(e); LogUtil.error(e);
} }
} }

View File

@ -2,6 +2,7 @@ package io.metersphere.api.tcp;
import io.metersphere.api.tcp.server.TCPServer; import io.metersphere.api.tcp.server.TCPServer;
import io.metersphere.commons.exception.MSException; import io.metersphere.commons.exception.MSException;
import io.metersphere.commons.utils.LogUtil;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -34,7 +35,7 @@ public class TCPPool {
returnString = "OK"; returnString = "OK";
}catch (Exception e){ }catch (Exception e){
returnString = e.getMessage(); returnString = e.getMessage();
e.printStackTrace(); LogUtil.error(e);
MSException.throwException(e.getMessage()); MSException.throwException(e.getMessage());
} }
} }
@ -81,7 +82,7 @@ public class TCPPool {
returnMsg = "OK"; returnMsg = "OK";
}catch (Exception e){ }catch (Exception e){
returnMsg = e.getMessage(); returnMsg = e.getMessage();
e.printStackTrace(); LogUtil.error(e);
} }
return returnMsg; return returnMsg;
} }

View File

@ -1,5 +1,7 @@
package io.metersphere.api.tcp.server; package io.metersphere.api.tcp.server;
import io.metersphere.commons.utils.LogUtil;
import java.net.ServerSocket; import java.net.ServerSocket;
import java.net.Socket; import java.net.Socket;
@ -55,7 +57,7 @@ public class TCPServer implements Runnable {
try { try {
this.openSocket(); this.openSocket();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }
} }

View File

@ -5,6 +5,7 @@ import io.metersphere.api.dto.mock.MockApiUtils;
import io.metersphere.api.service.MockConfigService; import io.metersphere.api.service.MockConfigService;
import io.metersphere.base.domain.MockExpectConfigWithBLOBs; import io.metersphere.base.domain.MockExpectConfigWithBLOBs;
import io.metersphere.commons.utils.CommonBeanFactory; import io.metersphere.commons.utils.CommonBeanFactory;
import io.metersphere.commons.utils.LogUtil;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
@ -32,7 +33,7 @@ public class TCPServicer {
returnMsg = this.getReturnMsg(message); returnMsg = this.getReturnMsg(message);
os.write(returnMsg.getBytes()); os.write(returnMsg.getBytes());
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
}finally { }finally {
this.close(); this.close();
} }
@ -51,7 +52,7 @@ public class TCPServicer {
delayed = responseObj.getInteger("delayed"); delayed = responseObj.getInteger("delayed");
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
if(responseObj.containsKey("responseResult")){ if(responseObj.containsKey("responseResult")){
JSONObject respResultObj = responseObj.getJSONObject("responseResult"); JSONObject respResultObj = responseObj.getJSONObject("responseResult");
@ -63,7 +64,7 @@ public class TCPServicer {
delayed = respResultObj.getInteger("delayed"); delayed = respResultObj.getInteger("delayed");
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
}else { }else {
returnMsg = responseObj.getString("body"); returnMsg = responseObj.getString("body");
@ -73,7 +74,7 @@ public class TCPServicer {
try { try {
Thread.sleep(delayed); Thread.sleep(delayed);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }
return returnMsg; return returnMsg;

View File

@ -2,6 +2,7 @@ package io.metersphere.commons.json;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.google.gson.*; import com.google.gson.*;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.jmeter.utils.ScriptEngineUtils; import io.metersphere.jmeter.utils.ScriptEngineUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -22,7 +23,7 @@ public class JSONSchemaGenerator {
JsonObject rootElement = element.getAsJsonObject(); JsonObject rootElement = element.getAsJsonObject();
analyzeRootSchemaElement(rootElement, rootObj); analyzeRootSchemaElement(rootElement, rootObj);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }

View File

@ -142,7 +142,7 @@ public class CompressUtils {
file.delete(); file.delete();
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }

View File

@ -100,7 +100,7 @@ public class DateUtils {
returnMap.put("firstTime", thisWeekFirstTime); returnMap.put("firstTime", thisWeekFirstTime);
returnMap.put("lastTime", thisWeekLastTime); returnMap.put("lastTime", thisWeekLastTime);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return returnMap; return returnMap;

View File

@ -280,7 +280,7 @@ public class FileUtils {
jarFiles.add(byteArrayResource); jarFiles.add(byteArrayResource);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return jarFiles; return jarFiles;

View File

@ -50,7 +50,7 @@ public class JsonStructUtils {
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return lastMatchResultIsTrue && !hasNotMatchResult; return lastMatchResultIsTrue && !hasNotMatchResult;
} else { } else {
@ -76,7 +76,7 @@ public class JsonStructUtils {
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return true; return true;
} else { } else {
@ -99,7 +99,7 @@ public class JsonStructUtils {
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return false; return false;
} else { } else {
@ -143,7 +143,7 @@ public class JsonStructUtils {
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return isMatch; return isMatch;
} else { } else {

View File

@ -113,7 +113,7 @@ public class RsaUtil {
try { try {
key = (RSAPublicKey) keyFactory.generatePublic(x509KeySpec); key = (RSAPublicKey) keyFactory.generatePublic(x509KeySpec);
} catch (InvalidKeySpecException e) { } catch (InvalidKeySpecException e) {
e.printStackTrace(); LogUtil.error(e);
} }
return key; return key;
} }
@ -148,7 +148,7 @@ public class RsaUtil {
try { try {
key = (RSAPrivateKey) keyFactory.generatePrivate(pkcs8KeySpec); key = (RSAPrivateKey) keyFactory.generatePrivate(pkcs8KeySpec);
} catch (InvalidKeySpecException e) { } catch (InvalidKeySpecException e) {
e.printStackTrace(); LogUtil.error(e);
} }
return key; return key;
} }

View File

@ -16,7 +16,7 @@ public class UrlTestUtils {
return true; return true;
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
return false; return false;
} }
return false; return false;

View File

@ -148,7 +148,7 @@ public class WeakConcurrentHashMap<K, V> extends ConcurrentHashMap<K, V> {
try { try {
Thread.sleep(expiryInMillis / 2); Thread.sleep(expiryInMillis / 2);
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }
} }

View File

@ -107,7 +107,7 @@ public abstract class EasyExcelListener<T> extends AnalysisEventListener<T> {
} }
} }
} catch (NoSuchFieldException e) { } catch (NoSuchFieldException e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }
super.invokeHeadMap(headMap, context); super.invokeHeadMap(headMap, context);

View File

@ -125,7 +125,7 @@ public class TestCaseNoModelDataListener extends AnalysisEventListener<Map<Integ
// } // }
// } // }
} catch (NoSuchFieldException e) { } catch (NoSuchFieldException e) {
e.printStackTrace(); LogUtil.error(e);
} }
// } // }
this.formatHeadMap(); this.formatHeadMap();

View File

@ -310,7 +310,7 @@ public class ScheduleManager {
returnMap.put("groupName", groupName); returnMap.put("groupName", groupName);
} }
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); LogUtil.error(e);
} }
return returnMap; return returnMap;

View File

@ -7,6 +7,7 @@ import io.metersphere.api.dto.definition.request.sampler.MsHTTPSamplerProxy;
import io.metersphere.api.dto.definition.request.sampler.MsJDBCSampler; import io.metersphere.api.dto.definition.request.sampler.MsJDBCSampler;
import io.metersphere.api.dto.definition.request.sampler.MsTCPSampler; import io.metersphere.api.dto.definition.request.sampler.MsTCPSampler;
import io.metersphere.api.dto.scenario.Body; import io.metersphere.api.dto.scenario.Body;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.log.utils.diff.json.JacksonDiff; import io.metersphere.log.utils.diff.json.JacksonDiff;
import io.metersphere.log.utils.diff.json.JsonDiff; import io.metersphere.log.utils.diff.json.JsonDiff;
import io.metersphere.log.vo.DetailColumn; import io.metersphere.log.vo.DetailColumn;
@ -71,7 +72,7 @@ public class ApiDefinitionDiffUtil {
return JSON.toJSONString(diffMap); return JSON.toJSONString(diffMap);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
return null; return null;
} }

View File

@ -2,14 +2,13 @@ package io.metersphere.notice.util;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.apache.http.HttpStatus; import io.metersphere.commons.utils.LogUtil;
import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ContentType; import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity; import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import java.io.IOException; import java.io.IOException;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
@ -42,12 +41,12 @@ public class LarkClient {
sendResult.setIsSuccess(errcode.equals(0)); sendResult.setIsSuccess(errcode.equals(0));
}*/ }*/
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} finally { } finally {
try { try {
response.close(); response.close();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }
return sendResult; return sendResult;

View File

@ -136,7 +136,7 @@ public class MetricQueryService {
timestamps.add(DateUtils.getTimeString((long) (timestamp * 1000))); timestamps.add(DateUtils.getTimeString((long) (timestamp * 1000)));
} catch (Exception e) { } catch (Exception e) {
LogUtil.error(e.getMessage(), e); LogUtil.error(e.getMessage(), e);
e.printStackTrace(); LogUtil.error(e);
} }
values.add(ja.getDouble(1)); values.add(ja.getDouble(1));
}); });

View File

@ -811,7 +811,7 @@ public class PerformanceTestService {
try { try {
fileMetadata = fileService.saveFile(file, FileUtil.readAsByteArray(file)); fileMetadata = fileService.saveFile(file, FileUtil.readAsByteArray(file));
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); LogUtil.error(e);
} }
saveLoadTestFile(fileMetadata, loadTestId, sort); saveLoadTestFile(fileMetadata, loadTestId, sort);
} }

View File

@ -11,10 +11,7 @@ import io.metersphere.commons.constants.UserGroupConstants;
import io.metersphere.commons.constants.UserGroupType; import io.metersphere.commons.constants.UserGroupType;
import io.metersphere.commons.exception.MSException; import io.metersphere.commons.exception.MSException;
import io.metersphere.commons.user.SessionUser; import io.metersphere.commons.user.SessionUser;
import io.metersphere.commons.utils.BeanUtils; import io.metersphere.commons.utils.*;
import io.metersphere.commons.utils.PageUtils;
import io.metersphere.commons.utils.Pager;
import io.metersphere.commons.utils.SessionUtils;
import io.metersphere.controller.request.GroupRequest; import io.metersphere.controller.request.GroupRequest;
import io.metersphere.controller.request.group.EditGroupRequest; import io.metersphere.controller.request.group.EditGroupRequest;
import io.metersphere.controller.request.group.EditGroupUserRequest; import io.metersphere.controller.request.group.EditGroupUserRequest;
@ -170,7 +167,7 @@ public class GroupService {
List<GroupResourceDTO> dtoPermissions = dto.getPermissions(); List<GroupResourceDTO> dtoPermissions = dto.getPermissions();
dtoPermissions.addAll(getResourcePermission(resource, permissions, type, permissionList)); dtoPermissions.addAll(getResourcePermission(resource, permissions, type, permissionList));
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }
return dto; return dto;

View File

@ -1,6 +1,7 @@
package io.metersphere.service; package io.metersphere.service;
import io.metersphere.commons.utils.BeanUtils; import io.metersphere.commons.utils.BeanUtils;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.track.dto.TreeNodeDTO; import io.metersphere.track.dto.TreeNodeDTO;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -22,9 +23,9 @@ public class NodeTreeService<T extends TreeNodeDTO> {
try { try {
instance = (T) clazz.newInstance(); instance = (T) clazz.newInstance();
} catch (InstantiationException e) { } catch (InstantiationException e) {
e.printStackTrace(); LogUtil.error(e);
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
e.printStackTrace(); LogUtil.error(e);
} }
return instance; return instance;
} }

View File

@ -129,7 +129,7 @@ public class PluginService {
method.invoke(classLoader, url); method.invoke(classLoader, url);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }

View File

@ -15,6 +15,7 @@ import io.metersphere.base.mapper.ext.ExtUserMapper;
import io.metersphere.commons.constants.UserGroupConstants; import io.metersphere.commons.constants.UserGroupConstants;
import io.metersphere.commons.exception.MSException; import io.metersphere.commons.exception.MSException;
import io.metersphere.commons.utils.CommonBeanFactory; import io.metersphere.commons.utils.CommonBeanFactory;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.commons.utils.ServiceUtils; import io.metersphere.commons.utils.ServiceUtils;
import io.metersphere.commons.utils.SessionUtils; import io.metersphere.commons.utils.SessionUtils;
import io.metersphere.controller.request.ProjectRequest; import io.metersphere.controller.request.ProjectRequest;
@ -685,7 +686,7 @@ public class ProjectService {
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }

View File

@ -157,7 +157,6 @@ public class ScheduleService {
} }
} catch (Exception e) { } catch (Exception e) {
LogUtil.error("初始化任务失败", e); LogUtil.error("初始化任务失败", e);
e.printStackTrace();
} }
}); });
} }

View File

@ -1723,8 +1723,7 @@ public class TestCaseService {
isUpdated = easyExcelListener.isUpdated(); isUpdated = easyExcelListener.isUpdated();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
LogUtil.error(e.getMessage(), e);
MSException.throwException(e.getMessage()); MSException.throwException(e.getMessage());
} }
} }

View File

@ -342,7 +342,6 @@ public class TestPlanApiCaseService {
return jDBCSampler; return jDBCSampler;
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
LogUtil.error(e); LogUtil.error(e);
} }
return null; return null;

View File

@ -1076,7 +1076,7 @@ public class TestPlanService {
runModeConfig = JSONObject.parseObject(apiRunConfig, RunModeConfig.class); runModeConfig = JSONObject.parseObject(apiRunConfig, RunModeConfig.class);
runModeConfig.setOnSampleError(false); runModeConfig.setOnSampleError(false);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
if (runModeConfig == null) { if (runModeConfig == null) {
runModeConfig = new RunModeConfig(); runModeConfig = new RunModeConfig();
@ -1157,7 +1157,7 @@ public class TestPlanService {
testPlanLoadCaseService.update(loadCase); testPlanLoadCaseService.update(loadCase);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
} }
performaneThreadIDMap.put(performanceRequest.getTestPlanLoadId(),reportId); performaneThreadIDMap.put(performanceRequest.getTestPlanLoadId(),reportId);
if (StringUtils.isNotEmpty(reportId)) { if (StringUtils.isNotEmpty(reportId)) {
@ -1200,7 +1200,7 @@ public class TestPlanService {
Thread.sleep(10000); Thread.sleep(10000);
} }
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); LogUtil.error(e);
} }
}); });
} }

View File

@ -1,6 +1,7 @@
package io.metersphere.websocket.c.to.c; package io.metersphere.websocket.c.to.c;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.websocket.c.to.c.util.MsgDto; import io.metersphere.websocket.c.to.c.util.MsgDto;
import org.java_websocket.client.WebSocketClient; import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake; import org.java_websocket.handshake.ServerHandshake;
@ -48,7 +49,7 @@ public class MsWebSocketClient extends WebSocketClient{
dto.setToReport("3933abd9"); dto.setToReport("3933abd9");
client.send(JSON.toJSONString(dto)); client.send(JSON.toJSONString(dto));
} catch (URISyntaxException e) { } catch (URISyntaxException e) {
e.printStackTrace(); LogUtil.error(e);
} }
} }
} }

@ -1 +1 @@
Subproject commit 4cbe39abad949c27aee0bf222da0d175550f2bcf Subproject commit 14c626b6a1a78532960ba0eb64eaa9d8d3869aed

View File

@ -288,8 +288,7 @@ public abstract class JSR223TestElement extends ScriptingTestElement
} }
groovyScriptEngine.getClassLoader().addURL(file.toURI().toURL()); groovyScriptEngine.getClassLoader().addURL(file.toURI().toURL());
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); LogUtil.error(e);
LogUtil.error(e.getMessage(), e);
} }
}); });