aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukasz Muszkieta <lukasz.muszkieta@nokia.com>2019-12-13 09:09:34 +0000
committerGerrit Code Review <gerrit@onap.org>2019-12-13 09:09:34 +0000
commita5325db88ce1f7d9daebfe1bd40e1bf5f928f68a (patch)
treeadd49e245b1c46448026b90cb263c2f5b3596d3f
parent02c068ce771ee4522936f2d15f41c2b631e965a8 (diff)
parent45a22d063e7cdcf6de71523b79b165eda1047581 (diff)
Merge "Sonar fix logger"
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java33
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/CamundaRequestHandler.java3
2 files changed, 18 insertions, 18 deletions
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
index 5987c5ad93..240bb83862 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
@@ -583,7 +583,7 @@ public class ToscaResourceInstaller {
String resourceSeqStr = resouceSequence.stream().collect(Collectors.joining(","));
service.setResourceOrder(resourceSeqStr);
- logger.debug(" resourceSeq for service uuid(" + service.getModelUUID() + ") : " + resourceSeqStr);
+ logger.debug(" resourceSeq for service uuid {}: {}", service.getModelUUID(), resourceSeqStr);
}
@@ -644,8 +644,7 @@ public class ToscaResourceInstaller {
String jsonStr = objectMapper.writeValueAsString(resouceRequest);
jsonStr = jsonStr.replace("\"", "\\\"");
- logger.debug(
- "resource request for resource customization id (" + resourceCustomizationUuid + ") : " + jsonStr);
+ logger.debug("resource request for resource customization id {}: {}", resourceCustomizationUuid, jsonStr);
return jsonStr;
} catch (JsonProcessingException e) {
logger.error("resource input could not be deserialized for resource customization id ("
@@ -688,8 +687,8 @@ public class ToscaResourceInstaller {
networkCustomization.setResourceInput(
getResourceInput(toscaResourceStruct, networkCustomization.getModelCustomizationUUID()));
service.getNetworkCustomizations().add(networkCustomization);
- logger.debug("No NetworkResourceName found in TempNetworkHeatTemplateLookup for "
- + networkResourceModelName);
+ logger.debug("No NetworkResourceName found in TempNetworkHeatTemplateLookup for {}",
+ networkResourceModelName);
}
}
@@ -1014,25 +1013,25 @@ public class ToscaResourceInstaller {
String vfCustomizationCategory =
vfEntityDetails.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_CATEGORY);
- logger.debug("VF Category is : " + vfCustomizationCategory);
+ logger.debug("VF Category is: {} ", vfCustomizationCategory);
String vfCustomizationUUID =
vfEntityDetails.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID);
- logger.debug("VFCustomizationUUID=" + vfCustomizationUUID);
+ logger.debug("VFCustomizationUUID= {}", vfCustomizationUUID);
IResourceInstance vfNotificationResource = vfResourceStructure.getResourceInstance();
// Make sure the VF ResourceCustomizationUUID from the notification and tosca customizations match before
// comparing their VF Modules UUID's
- logger.debug("Checking if Notification VF ResourceCustomizationUUID: "
- + vfNotificationResource.getResourceCustomizationUUID() + " matches Tosca VF Customization UUID: "
- + vfCustomizationUUID);
+ logger.debug(
+ "Checking if Notification VF ResourceCustomizationUUID: {} matches Tosca VF Customization UUID: {}",
+ vfNotificationResource.getResourceCustomizationUUID(), vfCustomizationUUID);
if (vfCustomizationUUID.equals(vfNotificationResource.getResourceCustomizationUUID())) {
- logger.debug("vfCustomizationUUID: " + vfCustomizationUUID
- + " matches vfNotificationResource CustomizationUUID");
+ logger.debug("vfCustomizationUUID: {} matches vfNotificationResource CustomizationUUID ",
+ vfCustomizationUUID);
VnfResourceCustomization vnfResource = createVnfResource(vfEntityDetails, toscaResourceStruct, service);
@@ -1044,7 +1043,7 @@ public class ToscaResourceInstaller {
for (VfModuleStructure vfModuleStructure : vfResourceStructure.getVfModuleStructure()) {
- logger.debug("vfModuleStructure:" + vfModuleStructure.toString());
+ logger.debug("vfModuleStructure: {}", vfModuleStructure);
List<IEntityDetails> vfModuleEntityList =
getEntityDetails(toscaResourceStruct,
@@ -1093,7 +1092,7 @@ public class ToscaResourceInstaller {
if (!CollectionUtils.isEmpty(seqResult)) {
String resultStr = seqResult.stream().collect(Collectors.joining(","));
vnfResource.setVnfcInstanceGroupOrder(resultStr);
- logger.debug("vnfcGroupOrder result for service uuid(" + service.getModelUUID() + ") : " + resultStr);
+ logger.debug("vnfcGroupOrder result for service uuid {}: {}", service.getModelUUID(), resultStr);
}
// add this vnfResource with existing vnfResource for this service
addVnfCustomization(service, vnfResource);
@@ -1203,7 +1202,7 @@ public class ToscaResourceInstaller {
watchdogDistributionStatusRepository.saveAndFlush(distributionStatus);
} catch (ObjectOptimisticLockingFailureException e) {
- logger.debug("ObjectOptimisticLockingFailureException in processWatchdog : " + e.toString());
+ logger.debug("ObjectOptimisticLockingFailureException in processWatchdog : {} ", e);
throw e;
}
}
@@ -2037,8 +2036,8 @@ public class ToscaResourceInstaller {
ObjectMapper objectMapper = new ObjectMapper();
jsonStr = objectMapper.writeValueAsString(resouceRequest);
jsonStr = jsonStr.replace("\"", "\\\"");
- logger.debug("vfcResource request for resource customization id (" + resourceCustomizationUuid + ") : "
- + jsonStr);
+ logger.debug("vfcResource request for resource customization id {}: {}", resourceCustomizationUuid,
+ jsonStr);
} catch (JsonProcessingException e) {
logger.debug("Json Exception: {}", e.getMessage());
logger.error("Exception occurred", e);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/CamundaRequestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/CamundaRequestHandler.java
index fb7ab3a61e..e9f17c42d0 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/CamundaRequestHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/CamundaRequestHandler.java
@@ -61,7 +61,8 @@ public class CamundaRequestHandler {
if (context.getRetryCount() == 0) {
logger.info("Querying Camunda for process-instance history for requestId: {}", requestId);
} else {
- logger.info("Retry: Querying Camunda for process-instance history for requestId: {}",
+ logger.info(
+ "Retry: Querying Camunda for process-instance history for retryCount: {} and requestId: {}",
context.getRetryCount(), requestId);
}
return restTemplate.exchange(targetUrl, HttpMethod.GET, requestEntity,