Consistently use parameterised logging 65/141665/3
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Sat, 9 Aug 2025 06:43:34 +0000 (08:43 +0200)
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Sun, 10 Aug 2025 15:10:52 +0000 (17:10 +0200)
- parameterised logging avoids (sometimes)
  costly string concatenations since the log
  string is lazily constructed for the active log
  level
- the 'log.debug("myParam is: " + myParam)' style is always executed
  regardless of the active log level

Issue-ID: SO-4220
Change-Id: I1a1f91346949d286d03745c06ba489dc9eded89a
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
86 files changed:
adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java
adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdate.java
adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java
adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java
adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/NetworkCollectionCatalogDbQueryTest.java
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/cloudregion/CloudRestImpl.java
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventory.java
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/DeleteAAIInventory.java
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterUtils.java
adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java
adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java
adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java
adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/client/ApplicationControllerCallback.java
adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/client/ApplicationControllerClient.java
asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
asdc-controller/src/main/java/org/onap/so/asdc/client/test/rest/ASDCRestInterface.java
asdc-controller/src/main/java/org/onap/so/asdc/installer/VfResourceStructure.java
asdc-controller/src/main/java/org/onap/so/asdc/installer/bpmn/WorkflowResource.java
asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java
bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java
bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/NssiCDSRequestProvider.java
bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/common/SendRequestToSdnr.java
bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmDmaapClient.java
bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/sdnc/lcm/beans/LcmBeanTest.java
bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/sdnc/lcm/beans/payload/LcmBasePayloadTest.java
bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/ResponseBuilder.java
bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/xml/XmlTool.java
bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/CallbackHandlerService.java
bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java
bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java
bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowProcessor.java
bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java
bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java
bpmn/so-bpmn-building-blocks/src/main/java/org/onap/so/bpmn/infrastructure/bpmn/activity/DeployActivitySpecs.java
bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/GenericPnfSWUPDownloadTest.java
bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/GenericPnfSoftwareUpgradeTest.java
bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/PnfHealthCheckTest.java
bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/ServiceLevelUpgradeTest.java
bpmn/so-bpmn-moi/src/main/java/org/onap/so/bpmn/moi/tasks/EnrichGBBTask.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/OofHomingV2.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIFlagTasks.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcOrchestratorPreProcessor.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/decisionpoint/impl/camunda/controller/sdnc/SdncControllerDE.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigAssignVnf.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnf.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasks.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasks.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/service/level/impl/ServiceLevelPreparation.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/service/level/impl/ServiceLevelRequestDispatcher.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/service/level/impl/ServiceLevelUpgrade.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilder.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecutionPlan.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBFailure.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/decisionpoint/impl/camunda/ControllerExecutionDETestIT.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/decisionpoint/impl/camunda/controller/sdnc/SDNCLcmPayloadBuilderTest.java
common/clients-base/src/main/java/org/onap/so/client/HttpClient.java
common/clients/src/main/java/org/onap/so/client/dmaap/DmaapConsumer.java
common/clients/src/main/java/org/onap/so/client/dmaap/DmaapPublisher.java
common/clients/src/main/java/org/onap/so/client/kafka/KafkaConsumerImpl.java
common/clients/src/main/java/org/onap/so/client/policy/PolicyClientImpl.java
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAITransactionalClient.java
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryResourcesClient.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/CamundaRequestHandler.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ManagedObject3gppServiceInstances.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstances.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequest.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceIntentApiHandler.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironment.java
so-optimization-clients/src/main/java/org/onap/so/client/oof/OofClient.java

index cbe2395..8a051b9 100644 (file)
@@ -494,7 +494,7 @@ public class MsoHeatUtils extends MsoCommonUtils implements VduPlugin {
             heatClient = getHeatClient(cloudSiteId, tenantId);
         } catch (MsoTenantNotFound e) {
             // Tenant doesn't exist, so stack doesn't either
-            logger.debug("Tenant with id " + tenantId + "not found.", e);
+            logger.debug("Tenant with id {} not found.", tenantId, e);
             return new StackInfo(stackName, HeatStatus.NOTFOUND);
         } catch (MsoException me) {
             // Got an Openstack error. Propagate it
index 2e7f423..48f406c 100644 (file)
@@ -223,8 +223,8 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
                     updateStack = queryHeatStack(heatClient, canonicalName);
                     logger.debug("{} ({}) ", updateStack.getStackStatus(), canonicalName);
                     try {
-                        logger.debug(
-                                "Current stack {}" + this.getOutputsAsStringBuilderWithUpdate(heatStack).toString());
+                        logger.debug("Current stack {}",
+                                this.getOutputsAsStringBuilderWithUpdate(heatStack).toString());
                     } catch (Exception e) {
                         logger.debug("an error occurred trying to print out the current outputs of the stack", e);
                     }
index 14f20ca..c5a2d6f 100644 (file)
@@ -585,9 +585,8 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin {
                     } else {
                         try {
                             logger.debug(
-                                    "Create Stack error - unable to query for stack status - attempting to delete stack: "
-                                            + instanceId
-                                            + " - This will likely fail and/or we won't be able to query to see if delete worked");
+                                    "Create Stack error - unable to query for stack status - attempting to delete stack: {} - This will likely fail and/or we won't be able to query to see if delete worked",
+                                    instanceId);
                             StackInfo deleteInfo = deleteStack(cloudSiteId, cloudOwner, tenantId, instanceId);
                             // this may be a waste of time - if we just got an exception trying to query the stack -
                             // we'll just
@@ -656,9 +655,9 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin {
                             "Create Stack error, stack deletion suppressed"));
                 } else {
                     try {
-                        logger.debug("Create Stack errored - attempting to DELETE stack: " + instanceId);
-                        logger.debug("deletePollInterval=" + deletePollInterval + ", deletePollTimeout="
-                                deletePollTimeout);
+                        logger.debug("Create Stack errored - attempting to DELETE stack: {}", instanceId);
+                        logger.debug("deletePollInterval={}, deletePollTimeout={}", deletePollInterval,
+                                deletePollTimeout);
                         StackInfo deleteInfo = deleteStack(cloudSiteId, cloudOwner, tenantId, instanceId);
                         boolean deleted = false;
                         while (!deleted) {
@@ -689,15 +688,15 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin {
                                             "Create Stack errored, stack deletion FAILED", "", "",
                                             ErrorCode.BusinessProcessError.getValue(),
                                             "Create Stack error, stack deletion FAILED"));
-                                    logger.debug("Stack deletion FAILED on a rollback of a create - " + instanceId
-                                            + ", status=" + queryInfo.getStatus() + ", reason="
-                                            + queryInfo.getStatusMessage());
+                                    logger.debug(
+                                            "Stack deletion FAILED on a rollback of a create - {}, status={}, reason={}",
+                                            instanceId, queryInfo.getStatus(), queryInfo.getStatusMessage());
                                     break;
                                 }
                             } catch (MsoException me2) {
                                 // Just log this one. We will report the original exception.
-                                logger.debug("Exception thrown trying to delete " + instanceId
-                                        + " on a create->rollback: " + me2.getContextMessage(), me2);
+                                logger.debug("Exception thrown trying to delete {} on a create->rollback: {}",
+                                        instanceId, me2.getContextMessage(), me2);
                                 logger.warn(String.format("%s %s %s %s %d %s",
                                         MessageEnum.RA_CREATE_STACK_ERR.toString(),
                                         "Create Stack errored, then stack deletion FAILED - exception thrown", "", "",
index 9a9bccf..6d17f9b 100644 (file)
@@ -9,9 +9,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -91,7 +91,7 @@ public class MsoNeutronUtils extends MsoCommonUtils {
      * If a network already exists with the same name, an exception will be thrown. Note that this is an MSO-imposed
      * restriction. Openstack does not require uniqueness on network names.
      * <p>
-     * 
+     *
      * @param cloudSiteId The cloud identifier (may be a region) in which to create the network.
      * @param tenantId The tenant in which to create the network
      * @param type The type of network to create (Basic, Provider, Multi-Provider)
@@ -172,7 +172,7 @@ public class MsoNeutronUtils extends MsoCommonUtils {
      * Whenever possible, the network ID should be used as it is much more efficient. Query by name requires retrieval
      * of all networks for the tenant and search for matching name.
      * <p>
-     * 
+     *
      * @param networkNameOrId The network to query
      * @param tenantId The Openstack tenant to look in for the network
      * @param cloudSiteId The cloud identifier (may be a region) in which to query the network.
@@ -210,7 +210,7 @@ public class MsoNeutronUtils extends MsoCommonUtils {
 
     public Optional<Port> getNeutronPort(String neutronPortId, String tenantId, String cloudSiteId) {
         try {
-            logger.debug("Finding Neutron port:" + neutronPortId);
+            logger.debug("Finding Neutron port: {}", neutronPortId);
             CloudSite cloudSite =
                     cloudConfig.getCloudSite(cloudSiteId).orElseThrow(() -> new MsoCloudSiteNotFound(cloudSiteId));
             Quantum neutronClient = getNeutronClient(cloudSite, tenantId);
@@ -228,7 +228,7 @@ public class MsoNeutronUtils extends MsoCommonUtils {
     /**
      * Delete the specified Network (by ID) in the given cloud. If the network does not exist, success is returned.
      * <p>
-     * 
+     *
      * @param networkId Openstack ID of the network to delete
      * @param tenantId The Openstack tenant.
      * @param cloudSiteId The cloud identifier (may be a region) from which to delete the network.
@@ -442,9 +442,9 @@ public class MsoNeutronUtils extends MsoCommonUtils {
      * name.
      *
      * @param adminClient an authenticated Keystone object
-     * 
+     *
      * @param tenantName the tenant name or ID to query
-     * 
+     *
      * @return a Tenant object or null if not found
      */
     public Network findNetworkByNameOrId(Quantum neutronClient, String networkNameOrId) {
@@ -465,9 +465,9 @@ public class MsoNeutronUtils extends MsoCommonUtils {
      * Find a network (or query its existence) by its Id.
      *
      * @param neutronClient an authenticated Quantum object
-     * 
+     *
      * @param networkId the network ID to query
-     * 
+     *
      * @return a Network object or null if not found
      */
     private Network findNetworkById(Quantum neutronClient, String networkId) {
@@ -502,7 +502,7 @@ public class MsoNeutronUtils extends MsoCommonUtils {
             return port;
         } catch (OpenStackResponseException e) {
             if (e.getStatus() == 404) {
-                logger.warn("Neutron port not found: " + neutronPortId, "Neutron port not found: " + neutronPortId);
+                logger.warn("Neutron port not found: {}", "Neutron port not found: " + neutronPortId, neutronPortId);
                 return null;
             } else {
                 logger.error("{} {} Openstack Error, GET Neutron Port By ID ({}): ",
@@ -524,9 +524,9 @@ public class MsoNeutronUtils extends MsoCommonUtils {
      * probably needs to return an error (instead of returning the first match).
      *
      * @param neutronClient an authenticated Quantum object
-     * 
+     *
      * @param networkName the network name to query
-     * 
+     *
      * @return a Network object or null if not found
      */
     public Network findNetworkByName(Quantum neutronClient, String networkName) {
index 510d5a4..cf7f9eb 100644 (file)
@@ -600,7 +600,7 @@ public class CatalogDbAdapterRest {
 
     public Response getProcessingFlagsImpl(String flag) {
         ProcessingFlags processingFlags = null;
-        logger.debug("Flag is: " + flag);
+        logger.debug("Flag is: {}", flag);
         int respStatus = HttpStatus.SC_OK;
         try {
             processingFlags = processingFlagsRepo.findByFlag(flag);
@@ -633,7 +633,7 @@ public class CatalogDbAdapterRest {
 
     public Response updateProcessingFlagsValueImpl(String flag, ProcessingFlags updatedProcessingFlag) {
         ProcessingFlags processingFlags = null;
-        logger.debug("Flag is: " + flag);
+        logger.debug("Flag is: {}", flag);
         int respStatus = HttpStatus.SC_OK;
         try {
             if (updatedProcessingFlag == null) {
@@ -642,7 +642,7 @@ public class CatalogDbAdapterRest {
             }
             String value = updatedProcessingFlag.getValue();
             if (value == null || (!value.equalsIgnoreCase("YES") && !value.equalsIgnoreCase("NO"))) {
-                logger.debug("Value " + value + " is invalid, only yes/no are allowed");
+                logger.debug("Value {} is invalid, only yes/no are allowed", value);
                 throw new RuntimeException("Invalid value specified");
             }
             processingFlags = processingFlagsRepo.findByFlag(flag);
index fd12a77..f5d96e0 100644 (file)
@@ -92,8 +92,8 @@ public class NetworkCollectionCatalogDbQueryTest extends CatalogDbAdapterBaseTes
                                 collectionInstanceGroupList = instanceGroup.getCollectionInstanceGroupCustomizations();
                                 CollectionNetworkResourceCustomization collectionNetworkCust =
                                         instanceGroup.getCollectionNetworkResourceCustomizations().get(0);
-                                logger.debug("Found Collection Network Resource Customization: "
-                                        collectionNetworkCust.getModelCustomizationUUID());
+                                logger.debug("Found Collection Network Resource Customization: {}",
+                                        collectionNetworkCust.getModelCustomizationUUID());
                             } else {
                                 logger.debug(
                                         "No Network Collection found. toscaNodeType does not contain NetworkCollection");
@@ -122,7 +122,7 @@ public class NetworkCollectionCatalogDbQueryTest extends CatalogDbAdapterBaseTes
         logger.debug(Integer.toString(port));
         String buildingBlockFlowName = "CreateNetworkCollectionBB";
         BuildingBlockDetail buildingBlockDetail = client.getBuildingBlockDetail(buildingBlockFlowName);
-        logger.debug("" + buildingBlockDetail.getResourceType());
+        logger.debug("{}", buildingBlockDetail.getResourceType());
         assertNotNull(buildingBlockDetail);
     }
 
index bb2c938..1739e6b 100644 (file)
@@ -114,7 +114,7 @@ public class CloudRestImpl {
                 catalogDBClient.postCloudSite(cloudSite);
             }
         } catch (Exception e) {
-            logger.error("Error creating cloud site in Catalog Adapter: " + e.getMessage(), e);
+            logger.error("Error creating cloud site in Catalog Adapter: {}", e.getMessage(), e);
             throw new CloudException("Error creating cloud site in Catalog Adapter", e);
         }
     }
index 15cf4af..5c97278 100644 (file)
@@ -62,7 +62,7 @@ public class CreateAAIInventory {
         CloudSite cloudSite = cloudConfig.getCloudSite(cloudInformation.getRegionId())
                 .orElseThrow(() -> new MsoCloudSiteNotFound(cloudInformation.getRegionId()));
         if (cloudSite.getOrchestrator() != null && MULTICLOUD_MODE.equalsIgnoreCase(cloudSite.getOrchestrator())) {
-            logger.debug("Skipping Heatbridge as CloudSite orchestrator is: " + MULTICLOUD_MODE);
+            logger.debug("Skipping Heatbridge as CloudSite orchestrator is: {}", MULTICLOUD_MODE);
             return;
         }
         CloudIdentity cloudIdentity = cloudSite.getIdentityService();
index f9bbf4a..08ffe14 100644 (file)
@@ -55,7 +55,7 @@ public class DeleteAAIInventory {
         CloudSite cloudSite = cloudConfig.getCloudSite(cloudInformation.getRegionId())
                 .orElseThrow(() -> new MsoCloudSiteNotFound(cloudInformation.getRegionId()));
         if (cloudSite.getOrchestrator() != null && MULTICLOUD_MODE.equalsIgnoreCase(cloudSite.getOrchestrator())) {
-            logger.debug("Skipping Heatbridge as CloudSite orchestrator is: " + MULTICLOUD_MODE);
+            logger.debug("Skipping Heatbridge as CloudSite orchestrator is: {}", MULTICLOUD_MODE);
             return;
         }
         CloudIdentity cloudIdentity = cloudSite.getIdentityService();
index 8b7d1a1..6893dd4 100644 (file)
@@ -297,7 +297,7 @@ public class MsoVnfAdapterImpl {
                         String str = this.convertNode((JsonNode) obj);
                         stringMap.put(key, str);
                     } catch (Exception e) {
-                        logger.debug("DANGER WILL ROBINSON: unable to convert value for JsonNode " + key, e);
+                        logger.debug("DANGER WILL ROBINSON: unable to convert value for JsonNode {}", key, e);
                         // okay in this instance - only string values (fqdn) are expected to be needed
                     }
                 } else if (obj instanceof java.util.LinkedHashMap) {
@@ -306,23 +306,21 @@ public class MsoVnfAdapterImpl {
                         String str = JSON_MAPPER.writeValueAsString(obj);
                         stringMap.put(key, str);
                     } catch (Exception e) {
-                        logger.debug("DANGER WILL ROBINSON: unable to convert value for LinkedHashMap " + key, e);
+                        logger.debug("DANGER WILL ROBINSON: unable to convert value for LinkedHashMap {}", key, e);
                     }
                 } else if (obj instanceof Integer) {
                     try {
                         String str = "" + obj;
                         stringMap.put(key, str);
                     } catch (Exception e) {
-                        logger.debug("DANGER WILL ROBINSON: unable to convert value for Integer " + key, e);
+                        logger.debug("DANGER WILL ROBINSON: unable to convert value for Integer {}", key, e);
                     }
                 } else {
                     try {
                         String str = obj.toString();
                         stringMap.put(key, str);
                     } catch (Exception e) {
-                        logger.debug(
-                                "DANGER WILL ROBINSON: unable to convert value " + key + " (" + e.getMessage() + ")",
-                                e);
+                        logger.debug("DANGER WILL ROBINSON: unable to convert value {} ({})", key, e.getMessage(), e);
                     }
                 }
             }
@@ -344,8 +342,8 @@ public class MsoVnfAdapterImpl {
         boolean useMCUuid = false;
         if (mcu != null && !mcu.isEmpty()) {
             if ("null".equalsIgnoreCase(mcu)) {
-                logger.debug("modelCustomizationUuid: passed in as the string 'null' - will ignore: "
-                        modelCustomizationUuid);
+                logger.debug("modelCustomizationUuid: passed in as the string 'null' - will ignore: {}",
+                        modelCustomizationUuid);
                 useMCUuid = false;
                 mcu = "";
             } else {
@@ -381,8 +379,8 @@ public class MsoVnfAdapterImpl {
             isVolumeRequest = true;
         }
 
-        logger.debug("requestTypeString = " + requestTypeString + ", nestedStackId = " + nestedStackId
-                + ", nestedBaseStackId = " + nestedBaseStackId);
+        logger.debug("requestTypeString = {}, nestedStackId = {}, nestedBaseStackId = {}", requestTypeString,
+                nestedStackId, nestedBaseStackId);
 
         // handle a nestedStackId if sent- this one would be for the volume - so applies to both Vf and Vnf
         StackInfo nestedHeatStack = null;
@@ -560,10 +558,11 @@ public class MsoVnfAdapterImpl {
                         if (!doNotTest) {
                             if ((moreThanMin || equalToMin) // aic >= min
                                     && (equalToMax || !(moreThanMax))) { // aic <= max
-                                logger.debug("VNF Resource " + vnfResource.getModelName() + ", ModelUuid="
-                                        + vnfResource.getModelUUID() + " " + VERSION_MIN + " =" + minVersionVnf + " "
-                                        + VERSION_MAX + " :" + maxVersionVnf + " supported on Cloud: " + cloudSiteId
-                                        + " with AIC_Version:" + cloudSiteOpt.get().getCloudVersion());
+                                logger.debug(
+                                        "VNF Resource {}, ModelUuid={} {} ={} {} :{} supported on Cloud: {} with AIC_Version:{}",
+                                        vnfResource.getModelName(), vnfResource.getModelUUID(), VERSION_MIN,
+                                        minVersionVnf, VERSION_MAX, maxVersionVnf, cloudSiteId,
+                                        cloudSiteOpt.get().getCloudVersion());
                             } else {
                                 // ERROR
                                 String error = "VNF Resource type: " + vnfResource.getModelName() + ", ModelUuid="
@@ -617,7 +616,7 @@ public class MsoVnfAdapterImpl {
 
             if (oldWay) {
                 // This will handle old Gamma BrocadeVCE VNF
-                logger.debug("No environment parameter found for this Type " + vfModuleType);
+                logger.debug("No environment parameter found for this Type {}", vfModuleType);
             } else {
                 if (heatEnvironment == null) {
                     String error = "Update VNF: undefined Heat Environment. VF=" + vfModuleType
@@ -633,8 +632,8 @@ public class MsoVnfAdapterImpl {
                 }
             }
 
-            logger.debug("In MsoVnfAdapterImpl, about to call db.getNestedTemplates avec templateId="
-                    heatTemplate.getArtifactUuid());
+            logger.debug("In MsoVnfAdapterImpl, about to call db.getNestedTemplates avec templateId={}",
+                    heatTemplate.getArtifactUuid());
 
 
             List<HeatTemplate> nestedTemplates = heatTemplate.getChildTemplates();
@@ -666,8 +665,8 @@ public class MsoVnfAdapterImpl {
                     logger.debug("AddGetFilesOnVolumeReq - setting to true! {}", propertyString);
                 }
             } catch (Exception e) {
-                logger.debug("An error occured trying to get property " + MsoVnfAdapterImpl.ADD_GET_FILES_ON_VOLUME_REQ
-                        + " - default to false", e);
+                logger.debug("An error occured trying to get property {} - default to false",
+                        MsoVnfAdapterImpl.ADD_GET_FILES_ON_VOLUME_REQ, e);
             }
 
             if (!isVolumeRequest || addGetFilesOnVolumeReq) {
@@ -676,8 +675,8 @@ public class MsoVnfAdapterImpl {
                 } else {
                     // now use VF_MODULE_TO_HEAT_FILES table
                     logger.debug(
-                            "In MsoVnfAdapterImpl createVfModule, about to call db.getHeatFilesForVfModule avec vfModuleId="
-                                    + vf.getModelUUID());
+                            "In MsoVnfAdapterImpl createVfModule, about to call db.getHeatFilesForVfModule avec vfModuleId={}",
+                            vf.getModelUUID());
                     heatFiles = vf.getHeatFiles();
                 }
                 if (heatFiles != null && !heatFiles.isEmpty()) {
@@ -688,7 +687,7 @@ public class MsoVnfAdapterImpl {
                     logger.debug("Contents of heatFiles - to be added to files: on stack");
 
                     for (HeatFiles heatfile : heatFiles) {
-                        logger.debug(heatfile.getFileName() + " -> " + heatfile.getFileBody());
+                        logger.debug("{} -> {}", heatfile.getFileName(), heatfile.getFileBody());
                         heatFilesObjects.put(heatfile.getFileName(), heatfile.getFileBody());
                     }
                 } else {
@@ -711,8 +710,8 @@ public class MsoVnfAdapterImpl {
                 String propertyString = this.environment.getProperty(MsoVnfAdapterImpl.CHECK_REQD_PARAMS);
                 if ("false".equalsIgnoreCase(propertyString) || "n".equalsIgnoreCase(propertyString)) {
                     checkRequiredParameters = false;
-                    logger.debug("CheckRequiredParameters is FALSE. Will still check but then skip blocking..."
-                            MsoVnfAdapterImpl.CHECK_REQD_PARAMS);
+                    logger.debug("CheckRequiredParameters is FALSE. Will still check but then skip blocking...{}",
+                            MsoVnfAdapterImpl.CHECK_REQD_PARAMS);
                 }
             } catch (Exception e) {
                 // No problem - default is true
@@ -775,14 +774,14 @@ public class MsoVnfAdapterImpl {
             msoHeatUtils.copyBaseOutputsToInputs(goldenInputs, nestedVolumeOutputs, parameterNames, aliasToParam);
 
             for (HeatTemplateParam parm : heatTemplate.getParameters()) {
-                logger.debug("Parameter:'" + parm.getParamName() + "', isRequired=" + parm.isRequired() + ", alias="
-                        parm.getParamAlias());
+                logger.debug("Parameter:'{}', isRequired={}, alias={}", parm.getParamName(), parm.isRequired(),
+                        parm.getParamAlias());
 
                 if (parm.isRequired() && (goldenInputs == null || !goldenInputs.containsKey(parm.getParamName()))) {
                     // The check for an alias was moved to the method in MsoHeatUtils - when we converted the
                     // Map<String, String> to Map<String, Object>
-                    logger.debug("**Parameter " + parm.getParamName() + " is required and not in the inputs...check "
-                            + "environment");
+                    logger.debug("**Parameter {} is required and not in the inputs...check " + "environment",
+                            parm.getParamName());
                     if (mhee != null && mhee.containsParameter(parm.getParamName())) {
                         logger.debug("Required parameter {} appears to be in environment - do not count as missing",
                                 parm.getParamName());
@@ -900,7 +899,7 @@ public class MsoVnfAdapterImpl {
             StackInfo currentStack =
                     msoHeatUtils.deleteStack(tenantId, cloudOwner, cloudSiteId, stackId, false, timeoutMinutes);
             if (currentStack != null && outputs != null && outputs.value != null) {
-                logger.debug("Adding canonical stack id to outputs " + currentStack.getCanonicalName());
+                logger.debug("Adding canonical stack id to outputs {}", currentStack.getCanonicalName());
                 outputs.value.put("canonicalStackId", currentStack.getCanonicalName());
             }
             msoHeatUtils.updateResourceStatus(msoRequest.getRequestId(),
@@ -986,10 +985,10 @@ public class MsoVnfAdapterImpl {
             vfModuleName = this.getVfModuleNameFromModuleStackId(vfModuleStackId);
         }
 
-        logger.debug("Updating VFModule: " + vfModuleName + " of type " + vfModuleType + "in " + cloudOwner + "/"
-                + cloudSiteId + "/" + tenantId);
-        logger.debug("requestTypeString = " + requestTypeString + ", nestedVolumeStackId = " + nestedStackId
-                + ", nestedBaseStackId = " + nestedBaseStackId);
+        logger.debug("Updating VFModule: {} of type {}in {}/{}/{}", vfModuleName, vfModuleType, cloudOwner, cloudSiteId,
+                tenantId);
+        logger.debug("requestTypeString = {}, nestedVolumeStackId = {}, nestedBaseStackId = {}", requestTypeString,
+                nestedStackId, nestedBaseStackId);
 
         // Build a default rollback object (no actions performed)
         VnfRollback vfRollback = new VnfRollback();
@@ -1185,9 +1184,9 @@ public class MsoVnfAdapterImpl {
                     if (!doNotTest) {
                         if ((moreThanMin || equalToMin) // aic >= min
                                 && ((equalToMax) || !(moreThanMax))) { // aic <= max
-                            logger.debug("VNF Resource " + vnfResource.getModelName() + " " + VERSION_MIN + " ="
-                                    + minVersionVnf + " " + VERSION_MAX + " :" + maxVersionVnf + " supported on Cloud: "
-                                    + cloudSiteId + " with AIC_Version:" + aicV);
+                            logger.debug("VNF Resource {} {} ={} {} :{} supported on Cloud: {} with AIC_Version:{}",
+                                    vnfResource.getModelName(), VERSION_MIN, minVersionVnf, VERSION_MAX, maxVersionVnf,
+                                    cloudSiteId, aicV);
                         } else {
                             // ERROR
                             String error = "VNF Resource type: " + vnfResource.getModelName() + " " + VERSION_MIN + " ="
@@ -1254,7 +1253,7 @@ public class MsoVnfAdapterImpl {
             for (HeatTemplate entry : nestedTemplates) {
 
                 nestedTemplatesChecked.put(entry.getTemplateName(), entry.getTemplateBody());
-                logger.debug(entry.getTemplateName() + " -> " + entry.getTemplateBody());
+                logger.debug("{} -> {}", entry.getTemplateName(), entry.getTemplateBody());
             }
         } else {
             logger.debug("No nested templates found - nothing to do here");
@@ -1292,7 +1291,7 @@ public class MsoVnfAdapterImpl {
                 // this will match the nested templates format
                 logger.debug("Contents of heatFiles - to be added to files: on stack:");
                 for (HeatFiles heatfile : heatFiles) {
-                    logger.debug(heatfile.getFileName() + " -> " + heatfile.getFileBody());
+                    logger.debug("{} -> {}", heatfile.getFileName(), heatfile.getFileBody());
                     heatFilesObjects.put(heatfile.getFileName(), heatfile.getFileBody());
                 }
             } else {
@@ -1350,8 +1349,8 @@ public class MsoVnfAdapterImpl {
         boolean hasJson = false;
 
         for (HeatTemplateParam parm : heatTemplate.getParameters()) {
-            logger.debug("Parameter:'" + parm.getParamName() + "', isRequired=" + parm.isRequired() + ", alias="
-                    parm.getParamAlias());
+            logger.debug("Parameter:'{}', isRequired={}, alias={}", parm.getParamName(), parm.isRequired(),
+                    parm.getParamAlias());
             // handle json
             String parameterType = parm.getParamType();
             if (parameterType == null || "".equals(parameterType.trim())) {
@@ -1390,12 +1389,12 @@ public class MsoVnfAdapterImpl {
                         // TODO - what to do here?
                         // for now - send the error to debug, but just leave it as a String
                         String errorMessage = jpe.getMessage();
-                        logger.debug("Json Error Converting " + parm.getParamName() + " - " + errorMessage, jpe);
+                        logger.debug("Json Error Converting {} - {}", parm.getParamName(), errorMessage, jpe);
                         hasJson = false;
                         jsonNode = null;
                     } catch (Exception e) {
                         // or here?
-                        logger.debug("Json Error Converting " + parm.getParamName() + " " + e.getMessage(), e);
+                        logger.debug("Json Error Converting {} {}", parm.getParamName(), e.getMessage(), e);
                         hasJson = false;
                         jsonNode = null;
                     }
@@ -1416,7 +1415,7 @@ public class MsoVnfAdapterImpl {
                     String realParamName = parm.getParamName();
                     String alias = parm.getParamAlias();
                     Object value = inputs.get(alias);
-                    logger.debug("*Found an Alias: paramName=" + realParamName + ",alias=" + alias + ",value=" + value);
+                    logger.debug("*Found an Alias: paramName={},alias={},value={}", realParamName, alias, value);
                     inputs.remove(alias);
                     inputs.put(realParamName, value);
                     logger.debug("{} entry removed from inputs, added back using {}", alias, realParamName);
index bde6d6b..f9af33c 100644 (file)
@@ -178,7 +178,7 @@ public class MsoVnfPluginAdapterImpl {
     public void queryVnf(String cloudSiteId, String cloudOwner, String tenantId, String vnfNameOrId,
             MsoRequest msoRequest, Holder<Boolean> vnfExists, Holder<String> vnfId, Holder<VnfStatus> status,
             Holder<Map<String, String>> outputs) throws VnfException {
-        logger.debug("Querying VNF " + vnfNameOrId + " in " + cloudOwner + "/" + cloudSiteId + "/" + tenantId);
+        logger.debug("Querying VNF {} in {}/{}/{}", vnfNameOrId, cloudOwner, cloudSiteId, tenantId);
 
         // Will capture execution time for metrics
         long startTime = System.currentTimeMillis();
@@ -265,7 +265,7 @@ public class MsoVnfPluginAdapterImpl {
 
         String vfModuleId = rollback.getVfModuleStackId();
 
-        logger.debug("Rolling Back VF Module " + vfModuleId + " in " + cloudOwner + "/" + cloudSiteId + "/" + tenantId);
+        logger.debug("Rolling Back VF Module {} in {}/{}/{}", vfModuleId, cloudOwner, cloudSiteId, tenantId);
 
         VduInstance vduInstance = null;
 
@@ -326,7 +326,7 @@ public class MsoVnfPluginAdapterImpl {
             try {
                 return Integer.valueOf(inputValue.toString());
             } catch (Exception e) {
-                logger.debug("Unable to convert " + inputValue + " to an integer!", e);
+                logger.debug("Unable to convert {} to an integer!", inputValue, e);
                 return null;
             }
         } else if (type.equalsIgnoreCase("json")) {
@@ -334,7 +334,7 @@ public class MsoVnfPluginAdapterImpl {
                 JsonNode jsonNode = JSON_MAPPER.readTree(JSON_MAPPER.writeValueAsString(inputValue));
                 return jsonNode;
             } catch (Exception e) {
-                logger.debug("Unable to convert " + inputValue + " to a JsonNode!", e);
+                logger.debug("Unable to convert {} to a JsonNode!", inputValue, e);
                 return null;
             }
         } else if (type.equalsIgnoreCase("boolean")) {
@@ -376,8 +376,7 @@ public class MsoVnfPluginAdapterImpl {
                     String str = stackOutputs.get(key).toString();
                     stringOutputs.put(key, str);
                 } catch (Exception e) {
-                    logger.debug("Unable to add " + key + " to outputs - unable to call .toString() " + e.getMessage(),
-                            e);
+                    logger.debug("Unable to add {} to outputs - unable to call .toString() {}", key, e.getMessage(), e);
                 }
             }
         }
@@ -429,9 +428,9 @@ public class MsoVnfPluginAdapterImpl {
             final String json = JSON_MAPPER.writeValueAsString(obj);
             return json;
         } catch (JsonParseException jpe) {
-            logger.debug("Error converting json to string " + jpe.getMessage());
+            logger.debug("Error converting json to string {}", jpe.getMessage());
         } catch (Exception e) {
-            logger.debug("Error converting json to string " + e.getMessage());
+            logger.debug("Error converting json to string {}", e.getMessage());
         }
         return "[Error converting json to string]";
     }
@@ -453,7 +452,7 @@ public class MsoVnfPluginAdapterImpl {
                         String str = this.convertNode((JsonNode) obj);
                         stringMap.put(key, str);
                     } catch (Exception e) {
-                        logger.debug("DANGER WILL ROBINSON: unable to convert value for JsonNode " + key, e);
+                        logger.debug("DANGER WILL ROBINSON: unable to convert value for JsonNode {}", key, e);
                         // okay in this instance - only string values (fqdn) are expected to be needed
                     }
                 } else if (obj instanceof java.util.LinkedHashMap) {
@@ -462,23 +461,21 @@ public class MsoVnfPluginAdapterImpl {
                         String str = JSON_MAPPER.writeValueAsString(obj);
                         stringMap.put(key, str);
                     } catch (Exception e) {
-                        logger.debug("DANGER WILL ROBINSON: unable to convert value for LinkedHashMap " + key, e);
+                        logger.debug("DANGER WILL ROBINSON: unable to convert value for LinkedHashMap {}", key, e);
                     }
                 } else if (obj instanceof Integer) {
                     try {
                         String str = "" + obj;
                         stringMap.put(key, str);
                     } catch (Exception e) {
-                        logger.debug("DANGER WILL ROBINSON: unable to convert value for Integer " + key, e);
+                        logger.debug("DANGER WILL ROBINSON: unable to convert value for Integer {}", key, e);
                     }
                 } else {
                     try {
                         String str = obj.toString();
                         stringMap.put(key, str);
                     } catch (Exception e) {
-                        logger.debug(
-                                "DANGER WILL ROBINSON: unable to convert value " + key + " (" + e.getMessage() + ")",
-                                e);
+                        logger.debug("DANGER WILL ROBINSON: unable to convert value {} ({})", key, e.getMessage(), e);
                     }
                 }
             }
@@ -571,8 +568,8 @@ public class MsoVnfPluginAdapterImpl {
             isVolumeRequest = true;
         }
 
-        logger.debug("requestType = " + requestType + ", volumeGroupStackId = " + volumeGroupId + ", baseStackId = "
-                baseVfModuleId);
+        logger.debug("requestType = {}, volumeGroupStackId = {}, baseStackId = {}", requestType, volumeGroupId,
+                baseVfModuleId);
 
         // Get the VNF/VF Module definition from the Catalog DB first.
         // There are three relevant records: VfModule, VfModuleCustomization, VnfResource
@@ -602,7 +599,7 @@ public class MsoVnfPluginAdapterImpl {
             vnfResource = vfModuleCust.getVfModule().getVnfResources();
         } catch (Exception e) {
 
-            logger.debug("unhandled exception in create VF - [Query]" + e.getMessage());
+            logger.debug("unhandled exception in create VF - [Query]{}", e.getMessage());
             throw new VnfException("Exception during create VF " + e.getMessage());
         }
 
@@ -662,7 +659,7 @@ public class MsoVnfPluginAdapterImpl {
         // More precise handling/messaging if the Module already exists
         if (vduInstance != null && !(vduInstance.getStatus().getState() == VduStateType.NOTFOUND)) {
             VduStateType status = vduInstance.getStatus().getState();
-            logger.debug("Found Existing VDU, status=" + status);
+            logger.debug("Found Existing VDU, status={}", status);
 
             if (status == VduStateType.INSTANTIATED) {
                 if (failIfExists != null && failIfExists) {
@@ -846,7 +843,7 @@ public class MsoVnfPluginAdapterImpl {
             logger.debug(error);
             throw new VnfException(error, MsoExceptionCategory.INTERNAL);
         } else {
-            logger.debug("Got HEAT Template from DB: " + heatTemplate.getHeatTemplate());
+            logger.debug("Got HEAT Template from DB: {}", heatTemplate.getHeatTemplate());
         }
 
         if (heatEnvironment == null) {
@@ -856,7 +853,7 @@ public class MsoVnfPluginAdapterImpl {
                     "OpenStack", ErrorCode.DataError.getValue(), error);
             throw new VnfException(error, MsoExceptionCategory.INTERNAL);
         } else {
-            logger.debug("Got Heat Environment from DB: " + heatEnvironment.getEnvironment());
+            logger.debug("Got Heat Environment from DB: {}", heatEnvironment.getEnvironment());
         }
 
 
@@ -878,7 +875,7 @@ public class MsoVnfPluginAdapterImpl {
             HashMap<String, HeatTemplateParam> params = new HashMap<String, HeatTemplateParam>();
 
             Set<HeatTemplateParam> paramSet = heatTemplate.getParameters();
-            logger.debug("paramSet has " + paramSet.size() + " entries");
+            logger.debug("paramSet has {} entries", paramSet.size());
 
             for (HeatTemplateParam htp : paramSet) {
                 params.put(htp.getParamName(), htp);
@@ -897,8 +894,8 @@ public class MsoVnfPluginAdapterImpl {
                     if (value != null) {
                         goldenInputs.put(key, value);
                     } else {
-                        logger.debug("Failed to convert input " + key + "='" + inputs.get(key) + "' to "
-                                params.get(key).getParamType());
+                        logger.debug("Failed to convert input {}='{}' to {}", key, inputs.get(key),
+                                params.get(key).getParamType());
                     }
                 } else {
                     extraInputs.add(key);
@@ -916,7 +913,7 @@ public class MsoVnfPluginAdapterImpl {
                         }
                     }
                 }
-                logger.debug("Ignoring extra inputs: " + extraInputs);
+                logger.debug("Ignoring extra inputs: {}", extraInputs);
             }
 
             // Next add in Volume Group Outputs if there are any. Copy directly without conversions.
@@ -950,13 +947,13 @@ public class MsoVnfPluginAdapterImpl {
                 String propertyString = this.environment.getProperty(MsoVnfPluginAdapterImpl.CHECK_REQD_PARAMS);
                 if ("false".equalsIgnoreCase(propertyString) || "n".equalsIgnoreCase(propertyString)) {
                     checkRequiredParameters = false;
-                    logger.debug("CheckRequiredParameters is FALSE. Will still check but then skip blocking..."
-                            MsoVnfPluginAdapterImpl.CHECK_REQD_PARAMS);
+                    logger.debug("CheckRequiredParameters is FALSE. Will still check but then skip blocking...{}",
+                            MsoVnfPluginAdapterImpl.CHECK_REQD_PARAMS);
                 }
             } catch (Exception e) {
                 // No problem - default is true
-                logger.debug("An exception occured trying to get property " + MsoVnfPluginAdapterImpl.CHECK_REQD_PARAMS,
-                        e);
+                logger.debug("An exception occured trying to get property {}",
+                        MsoVnfPluginAdapterImpl.CHECK_REQD_PARAMS, e);
             }
 
             // Do the actual parameter checking.
@@ -969,10 +966,10 @@ public class MsoVnfPluginAdapterImpl {
             for (HeatTemplateParam parm : heatTemplate.getParameters()) {
                 if (parm.isRequired() && (!goldenInputs.containsKey(parm.getParamName()))) {
                     if (mhee != null && mhee.containsParameter(parm.getParamName())) {
-                        logger.debug("Required parameter " + parm.getParamName()
-                                + " appears to be in environment - do not count as missing");
+                        logger.debug("Required parameter {} appears to be in environment - do not count as missing",
+                                parm.getParamName());
                     } else {
-                        logger.debug("adding to missing parameters list: " + parm.getParamName());
+                        logger.debug("adding to missing parameters list: {}", parm.getParamName());
                         if (missingParams == null) {
                             missingParams = parm.getParamName();
                         } else {
@@ -991,8 +988,8 @@ public class MsoVnfPluginAdapterImpl {
                     logger.debug(error);
                     throw new VnfException(error, MsoExceptionCategory.USERDATA);
                 } else {
-                    logger.debug("found missing parameters [" + missingParams
-                            + "] - but checkRequiredParameters is false - " + "will not block");
+                    logger.debug("found missing parameters [{}] - but checkRequiredParameters is false - "
+                            + "will not block", missingParams);
                 }
             } else {
                 logger.debug("No missing parameters found - ok to proceed");
@@ -1047,7 +1044,7 @@ public class MsoVnfPluginAdapterImpl {
 
         vnfId.value = vduInstance.getVduInstanceId();
 
-        logger.debug("VF Module " + vfModuleName + " successfully created");
+        logger.debug("VF Module {} successfully created", vfModuleName);
         return;
     }
 
@@ -1055,7 +1052,7 @@ public class MsoVnfPluginAdapterImpl {
     public void deleteVfModule(String cloudSiteId, String cloudOwner, String tenantId, String vfModuleId,
             MsoRequest msoRequest, Holder<Map<String, String>> outputs) throws VnfException {
 
-        logger.debug("Deleting VF Module " + vfModuleId + " in " + cloudOwner + "/" + cloudSiteId + "/" + tenantId);
+        logger.debug("Deleting VF Module {} in {}/{}/{}", vfModuleId, cloudOwner, cloudSiteId, tenantId);
         // Will capture execution time for metrics
         long startTime = System.currentTimeMillis();
 
index 85f1a97..13b6f41 100644 (file)
@@ -51,7 +51,7 @@ public class VnfAdapterUtils {
         // cloudsite, use that. Otherwise, the default is the (original) HEAT-based
         // impl.
 
-        logger.debug("Entered GetVnfAdapterImpl: mode=" + mode + ", cloudSite=" + cloudSiteId);
+        logger.debug("Entered GetVnfAdapterImpl: mode={}, cloudSite={}", mode, cloudSiteId);
 
         if (mode == null) {
             // Didn't get an explicit mode type requested.
@@ -60,9 +60,9 @@ public class VnfAdapterUtils {
             // has a CloudifyManager assigned to it
             Optional<CloudSite> cloudSite = cloudConfig.getCloudSite(cloudSiteId);
             if (cloudSite.isPresent()) {
-                logger.debug("Got CloudSite: " + cloudSite.toString());
+                logger.debug("Got CloudSite: {}", cloudSite.toString());
                 if (MULTICLOUD_MODE.equalsIgnoreCase(cloudSite.get().getOrchestrator())) {
-                    logger.debug("GetVnfAdapterImpl: mode=" + MULTICLOUD_MODE);
+                    logger.debug("GetVnfAdapterImpl: mode={}", MULTICLOUD_MODE);
                     return true;
                 }
             }
index 9074d09..855d677 100644 (file)
@@ -199,7 +199,7 @@ public class HeatBridgeImpl implements HeatBridgeApi {
         Preconditions.checkState(!Strings.isNullOrEmpty(heatStackId), "Invalid heatStackId!");
         List<Resource> stackBasedResources =
                 osClient.getStackBasedResources(heatStackId, HeatBridgeConstants.OS_DEFAULT_HEAT_NESTING);
-        logger.debug(stackBasedResources.size() + " heat stack resources are extracted for stack: " + heatStackId);
+        logger.debug("{} heat stack resources are extracted for stack: {}", stackBasedResources.size(), heatStackId);
         return stackBasedResources;
     }
 
@@ -290,9 +290,9 @@ public class HeatBridgeImpl implements HeatBridgeApi {
                         .cloudRegion(cloudOwner, cloudRegionId).image(aaiImage.getImageId()));
                 if (!resourcesClient.exists(uri)) {
                     transaction.create(uri, aaiImage);
-                    logger.debug("Queuing AAI command to add image: " + aaiImage.getImageId());
+                    logger.debug("Queuing AAI command to add image: {}", aaiImage.getImageId());
                 } else {
-                    logger.debug("Nothing to add since image: " + aaiImage.getImageId() + "already exists in AAI.");
+                    logger.debug("Nothing to add since image: {}already exists in AAI.", aaiImage.getImageId());
                 }
             } catch (WebApplicationException e) {
                 throw new HeatBridgeException(
@@ -467,7 +467,7 @@ public class HeatBridgeImpl implements HeatBridgeApi {
     }
 
     protected String getInterfaceType(NodeType nodeType, String nicType) {
-        logger.debug("nicType: " + nicType + "nodeType: " + nodeType);
+        logger.debug("nicType: {}nodeType: {}", nicType, nodeType);
         if (DIRECT.equalsIgnoreCase(nicType)) {
             return SRIOV;
         } else {
@@ -507,7 +507,7 @@ public class HeatBridgeImpl implements HeatBridgeApi {
             for (Server server : osServers) {
                 Pserver pserver = aaiHelper.buildPserver(server);
                 if (pserver != null) {
-                    logger.debug("Adding Pserver: " + server.getHost());
+                    logger.debug("Adding Pserver: {}", server.getHost());
                     pserverMap.put(server.getHost(), pserver);
                 }
             }
@@ -773,7 +773,7 @@ public class HeatBridgeImpl implements HeatBridgeApi {
             transaction.execute(dryrun);
         } catch (BulkProcessFailed e) {
             String msg = "Failed to commit transaction";
-            logger.debug(msg + " with error: " + e);
+            logger.debug("{} with error: {}", msg, e);
             throw new HeatBridgeException(msg, e);
         }
     }
@@ -811,11 +811,11 @@ public class HeatBridgeImpl implements HeatBridgeApi {
 
         } catch (NotFoundException e) {
             String msg = "Failed to commit delete heatbridge data transaction";
-            logger.debug(msg + " with error: " + e);
+            logger.debug("{} with error: {}", msg, e);
             throw new HeatBridgeException(msg, e);
         } catch (Exception e) {
             String msg = "Failed to commit delete heatbridge data transaction";
-            logger.debug(msg + " with error: " + e);
+            logger.debug("{} with error: {}", msg, e);
             throw new HeatBridgeException(msg, e);
         }
     }
@@ -849,8 +849,8 @@ public class HeatBridgeImpl implements HeatBridgeApi {
                         pIf -> pIf.getSriovPfs() != null && CollectionUtils.isNotEmpty(pIf.getSriovPfs().getSriovPf()))
                         .forEach(pIf -> pIf.getSriovPfs().getSriovPf().forEach(sriovPf -> {
                             if (pciIds.contains(sriovPf.getPfPciId())) {
-                                logger.debug("creating transaction to delete SR-IOV PF: " + pIf.getInterfaceName()
-                                        + " from PServer: " + pserverName);
+                                logger.debug("creating transaction to delete SR-IOV PF: {} from PServer: {}",
+                                        pIf.getInterfaceName(), pserverName);
                                 if (env.getProperty("heatBridgeDryrun", Boolean.class, false)) {
                                     logger.debug("Would delete Sriov Pf: {}",
                                             AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
index 89c2623..39bbb96 100644 (file)
@@ -74,8 +74,8 @@ public class ArchiveInfraRequestsScheduler {
         calendar.add(Calendar.DATE, -archivedPeriod);
         Date archivingDate = calendar.getTime();
 
-        logger.debug("Date before 6 months: " + (calendar.get(Calendar.MONTH) + 1) + "-" + calendar.get(Calendar.DATE)
-                + "-" + calendar.get(Calendar.YEAR));
+        logger.debug("Date before 6 months: {}-{}-{}", (calendar.get(Calendar.MONTH) + 1), calendar.get(Calendar.DATE),
+                calendar.get(Calendar.YEAR));
 
         List<InfraActiveRequests> requestsByEndTime = new ArrayList<>();
 
index 0535b3d..ce6fc85 100644 (file)
@@ -63,14 +63,14 @@ public class MapRequestTunables {
                         + reqTunable.getAction();
             }
         }
-        logger.debug(GENERATED_KEY + key);
+        logger.debug("{}{}", GENERATED_KEY, key);
 
         String value;
         value = env.getProperty(key, "");
 
         if (Constants.MSO_ACTION_LCM.equals(msoAction) && (value == null || value.length() == 0)) {
             key = Constants.REQUEST_TUNABLES + "." + msoAction + ".default";
-            logger.debug("Can not find key of " + reqTunable.getOperation() + ", use default: " + key);
+            logger.debug("Can not find key of {}, use default: {}", reqTunable.getOperation(), key);
             value = env.getProperty(key, "");
         }
 
index 62f45f8..9366076 100644 (file)
@@ -11,9 +11,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -64,7 +64,7 @@ public class BPRestCallback {
     /**
      * Sends a message to the BPMN workflow message service. The URL path is constructed using the specified message
      * type and correlator.
-     * 
+     *
      * @param workflowMessageUrl the base BPMN WorkflowMessage URL
      * @param messageType the message type
      * @param correlator the message correlator
@@ -72,8 +72,8 @@ public class BPRestCallback {
      * @return true if the message was consumed successfully by the endpoint
      */
     public boolean send(String workflowMessageUrl, String messageType, String correlator, String message) {
-        logger.debug(getClass().getSimpleName() + ".send(" + "workflowMessageUrl=" + workflowMessageUrl
-                + " messageType=" + messageType + " correlator=" + correlator + " message=" + message + ")");
+        logger.debug("{}.send(workflowMessageUrl={} messageType={} correlator={} message={})",
+                getClass().getSimpleName(), workflowMessageUrl, messageType, correlator, message);
 
         while (workflowMessageUrl.endsWith("/")) {
             workflowMessageUrl = workflowMessageUrl.substring(0, workflowMessageUrl.length() - 1);
@@ -88,13 +88,13 @@ public class BPRestCallback {
     /**
      * Sends a message to the BPMN workflow message service. The specified URL must have the message type and correlator
      * already embedded in it.
-     * 
+     *
      * @param url the endpoint URL
      * @param message the JSON content
      * @return true if the message was consumed successfully by the endpoint
      */
     public boolean send(String url, String message) {
-        logger.debug(getClass().getSimpleName() + ".send(" + "url=" + url + " message=" + message + ")");
+        logger.debug("{}.send(" + "url={} message={})", getClass().getSimpleName(), url, message);
 
         logger.info(LoggingAnchor.THREE, MessageEnum.RA_CALLBACK_BPEL.toString(),
                 message == null ? "[no content]" : message, CAMUNDA);
index ea1baa7..df91d32 100644 (file)
@@ -49,8 +49,8 @@ public class ApplicationControllerCallback<T> implements ResponseHandler<T> {
 
         Status status = appCSupport.getStatusFromGenericResponse(response);
 
-        logger.info("Status code is: " + status.getCode());
-        logger.info("Status message is: " + status.getMessage());
+        logger.info("Status code is: {}", status.getCode());
+        logger.info("Status message is: {}", status.getMessage());
 
         if (appCSupport.getFinalityOf(status)) {
             logger.debug("Obtained final status, complete the task");
@@ -64,7 +64,7 @@ public class ApplicationControllerCallback<T> implements ResponseHandler<T> {
     public void onException(AppcClientException exception) {
 
         logger.info("ON EXCEPTION IN CALLBACK");
-        logger.info("Exception from APPC: " + exception.getMessage());
+        logger.info("Exception from APPC: {}", exception.getMessage());
         Status exceptionStatus = appCSupport.buildStatusFromAppcException(exception);
         completeExternalTask(externalTask, externalTaskService, exceptionStatus);
     }
index 603a405..8d02cc9 100644 (file)
@@ -203,7 +203,7 @@ public class ApplicationControllerClient {
             requestObject.getClass().getDeclaredMethod("setActionIdentifiers", ActionIdentifiers.class)
                     .invoke(requestObject, identifier);
             if (payload != null) {
-                logger.info("payload in RunCommand: " + payload.getValue());
+                logger.info("payload in RunCommand: {}", payload.getValue());
                 requestObject.getClass().getDeclaredMethod("setPayload", Payload.class).invoke(requestObject, payload);
             }
         } catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
index a649317..8f15f14 100644 (file)
@@ -372,7 +372,7 @@ public class ASDCController {
                 return downloadResult;
             }
         } catch (RuntimeException e) {
-            logger.debug("Not able to download the artifact due to an exception: " + artifact.getArtifactURL());
+            logger.debug("Not able to download the artifact due to an exception: {}", artifact.getArtifactURL());
             this.sendASDCNotification(NotificationType.DOWNLOAD, artifact.getArtifactURL(), asdcConfig.getConsumerID(),
                     distributionId, DistributionStatusEnum.DOWNLOAD_ERROR, e.getMessage(), System.currentTimeMillis());
 
@@ -568,8 +568,8 @@ public class ASDCController {
     protected void sendFinalDistributionStatus(String distributionID, DistributionStatusEnum status,
             String errorReason) {
 
-        logger.debug("Enter sendFinalDistributionStatus with DistributionID " + distributionID + " and Status of "
-                + status.name() + " and ErrorReason " + errorReason);
+        logger.debug("Enter sendFinalDistributionStatus with DistributionID {} and Status of {} and ErrorReason {}",
+                distributionID, status.name(), errorReason);
 
         long subStarttime = System.currentTimeMillis();
         try {
@@ -775,8 +775,8 @@ public class ASDCController {
                 try {
 
                     if (!this.checkResourceAlreadyDeployed(resourceStructure, serviceDeployed)) {
-                        logger.debug("Processing Resource Type: " + resourceType + " and Model UUID: "
-                                resourceStructure.getResourceInstance().getResourceUUID());
+                        logger.debug("Processing Resource Type: {} and Model UUID: {}", resourceType,
+                                resourceStructure.getResourceInstance().getResourceUUID());
 
 
                         if ("VF".equals(resourceType)) {
@@ -789,8 +789,8 @@ public class ASDCController {
                                 }
 
                                 if (ASDCConfiguration.VF_MODULES_METADATA.equals(artifact.getArtifactType())) {
-                                    logger.debug("VF_MODULE_ARTIFACT: "
-                                            new String(resultArtifact.getArtifactPayload(), StandardCharsets.UTF_8));
+                                    logger.debug("VF_MODULE_ARTIFACT: {}",
+                                            new String(resultArtifact.getArtifactPayload(), StandardCharsets.UTF_8));
                                     logger.debug(ASDCNotificationLogging
                                             .dumpVfModuleMetaDataList(((VfResourceStructure) resourceStructure)
                                                     .decodeVfModuleArtifact(resultArtifact.getArtifactPayload())));
@@ -800,8 +800,8 @@ public class ASDCController {
                                             resultArtifact);
                                 } else {
                                     writeArtifactToFile(artifact, resultArtifact);
-                                    logger.debug(
-                                            "Adding workflow artifact to structure: " + artifact.getArtifactName());
+                                    logger.debug("Adding workflow artifact to structure: {}",
+                                            artifact.getArtifactName());
                                     resourceStructure.addWorkflowArtifactToStructure(artifact, resultArtifact);
                                 }
 
@@ -824,7 +824,7 @@ public class ASDCController {
 
                 if (!hasVFResource) {
 
-                    logger.debug("No resources found for Service: " + iNotif.getServiceUUID());
+                    logger.debug("No resources found for Service: {}", iNotif.getServiceUUID());
 
                     logger.debug("Preparing to deploy Service: {}", iNotif.getServiceUUID());
                     try {
@@ -984,13 +984,13 @@ public class ASDCController {
                         .filter(e -> e.getArtifactType().equalsIgnoreCase("WORKFLOW")).findFirst();
                 if (artifactOpt.isPresent()) {
                     IArtifactInfo artifactInfo = artifactOpt.get();
-                    logger.debug("Ready to parse this serviceArtifactUUID:  " + artifactInfo.getArtifactUUID());
+                    logger.debug("Ready to parse this serviceArtifactUUID:  {}", artifactInfo.getArtifactUUID());
                     String filePath = Paths.get(getMsoConfigPath(), "ASDC", artifactInfo.getArtifactVersion(),
                             artifactInfo.getArtifactName()).normalize().toString();
                     ZipParser zipParserInstance = ZipParser.getInstance();
                     artifactContent = zipParserInstance.parseJsonForZip(filePath);
-                    logger.debug(
-                            "serviceArtifact parsing success! serviceArtifactUUID: " + artifactInfo.getArtifactUUID());
+                    logger.debug("serviceArtifact parsing success! serviceArtifactUUID: {}",
+                            artifactInfo.getArtifactUUID());
 
                     ResourceStructure resourceStructure = new VfResourceStructure(iNotif, new ResourceInstance());
                     resourceStructure.setResourceType(ResourceType.OTHER);
@@ -1004,8 +1004,8 @@ public class ASDCController {
             }
 
         } catch (IOException e) {
-            logger.error("serviceArtifact parse failure for service uuid:  "
-                    serviceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_CATEGORY));
+            logger.error("serviceArtifact parse failure for service uuid:  {}",
+                    serviceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_CATEGORY));
         } catch (Exception e) {
             logger.error("error NSST process resource failure ", e);
         }
index 4277850..4b2c6ab 100644 (file)
@@ -135,7 +135,7 @@ public class ASDCRestInterface {
             logger.info(LoggingAnchor.FOUR, MessageEnum.ASDC_ARTIFACT_DEPLOY_SUC.toString(),
                     statusData.getDistributionID(), "ASDC", "ASDC Updates Are Complete");
         } catch (final Exception e) {
-            logger.info("Error caught " + e.getMessage());
+            logger.info("Error caught {}", e.getMessage());
             logger.error(LoggingAnchor.SIX, MessageEnum.ASDC_GENERAL_EXCEPTION.toString(),
                     "Exception caught during ASDCRestInterface", "ASDC", "invokeASDCService",
                     ErrorCode.BusinessProcessError.getValue(), "Exception in invokeASDCService", e);
index a9aa19e..a4dd839 100644 (file)
@@ -97,7 +97,7 @@ public class VfResourceStructure extends ResourceStructure {
         VfModuleArtifact vfModuleArtifact = new VfModuleArtifact(artifactInfo, clientResult, modifiedHeatTemplate);
         addArtifactByType(artifactInfo, clientResult, vfModuleArtifact);
         if (ASDCConfiguration.VF_MODULES_METADATA.equals(artifactInfo.getArtifactType())) {
-            logger.debug("VF_MODULE_ARTIFACT: " + new String(clientResult.getArtifactPayload(), "UTF-8"));
+            logger.debug("VF_MODULE_ARTIFACT: {}", new String(clientResult.getArtifactPayload(), "UTF-8"));
             logger.debug(ASDCNotificationLogging.dumpVfModuleMetaDataList(vfModulesMetadataList));
         }
     }
index 1f111ba..d200dec 100644 (file)
@@ -84,12 +84,12 @@ public class WorkflowResource {
             for (String uuid : artifactsMapByUUID.keySet()) {
                 WorkflowArtifact artifactToInstall = artifactsMapByUUID.get(uuid);
                 if (isLatestVersionAvailable(artifactsMapByUUID, artifactToInstall)) {
-                    logger.debug("Installing the BPMN: " + artifactToInstall.getArtifactInfo().getArtifactName());
+                    logger.debug("Installing the BPMN: {}", artifactToInstall.getArtifactInfo().getArtifactName());
                     deployWorkflowResourceToCamunda(artifactToInstall);
                     installWorkflowResource(artifactToInstall, vfResourceModelUuid);
                 } else {
-                    logger.debug("Skipping installing - not the latest version: "
-                            artifactToInstall.getArtifactInfo().getArtifactName());
+                    logger.debug("Skipping installing - not the latest version: {}",
+                            artifactToInstall.getArtifactInfo().getArtifactName());
                 }
             }
         }
@@ -98,7 +98,7 @@ public class WorkflowResource {
     protected void deployWorkflowResourceToCamunda(WorkflowArtifact artifact) throws Exception {
         String bpmnName = artifact.getArtifactInfo().getArtifactName();
         String version = artifact.getArtifactInfo().getArtifactVersion();
-        logger.debug("BPMN Name: " + bpmnName);
+        logger.debug("BPMN Name: {}", bpmnName);
         try {
             HttpResponse response = bpmnInstaller.sendDeploymentRequest(bpmnName, version);
             logger.debug("Response status line: {}", response.getStatusLine());
index 180be2c..c46f481 100644 (file)
@@ -635,8 +635,8 @@ public class ToscaResourceInstaller {
             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 ("
-                    + resourceCustomizationUuid + ")");
+            logger.error("resource input could not be deserialized for resource customization id ({})",
+                    resourceCustomizationUuid);
             throw new ArtifactInstallerException("resource input could not be parsed", e);
         }
     }
@@ -1061,12 +1061,12 @@ public class ToscaResourceInstaller {
 
                     IVfModuleData vfMetadata = vfModuleStructure.getVfModuleMetadata();
 
-                    logger.debug("Comparing Vf_Modules_Metadata CustomizationUUID : "
-                            vfMetadata.getVfModuleModelCustomizationUUID());
+                    logger.debug("Comparing Vf_Modules_Metadata CustomizationUUID : {}",
+                            vfMetadata.getVfModuleModelCustomizationUUID());
 
                     Optional<IEntityDetails> matchingObject = vfModuleEntityList.stream()
-                            .peek(group -> logger.debug("To Csar Group VFModuleModelCustomizationUUID "
-                                    group.getMetadata().getValue("vfModuleModelCustomizationUUID")))
+                            .peek(group -> logger.debug("To Csar Group VFModuleModelCustomizationUUID {}",
+                                    group.getMetadata().getValue("vfModuleModelCustomizationUUID")))
                             .filter(group -> group.getMetadata().getValue("vfModuleModelCustomizationUUID")
                                     .equals(vfMetadata.getVfModuleModelCustomizationUUID()))
                             .findFirst();
@@ -1105,9 +1105,9 @@ public class ToscaResourceInstaller {
             // add this vnfResource with existing vnfResource for this service
             addVnfCustomization(service, vnfResource);
         } else {
-            logger.debug("Notification VF ResourceCustomizationUUID: "
-                    + vfNotificationResource.getResourceCustomizationUUID() + " doesn't match "
-                    + "Tosca VF Customization UUID: " + vfCustomizationUUID);
+            logger.debug(
+                    "Notification VF ResourceCustomizationUUID: {} doesn't match " + "Tosca VF Customization UUID: {}",
+                    vfNotificationResource.getResourceCustomizationUUID(), vfCustomizationUUID);
         }
     }
 
@@ -1456,7 +1456,7 @@ public class ToscaResourceInstaller {
             service.setOnapGeneratedNaming(generateNamingValue);
 
             List<Input> serviceInputs = toscaResourceStructure.getSdcCsarHelper().getServiceInputs();
-            logger.debug("serviceInputs: {} " + serviceInputs);
+            logger.debug("serviceInputs: {} {}", serviceInputs);
             if (!serviceInputs.isEmpty()) {
                 serviceInputs.forEach(input -> {
                     if (CDS_MODEL_NAME.equalsIgnoreCase(input.getName())) {
@@ -2942,8 +2942,8 @@ public class ToscaResourceInstaller {
                 serviceInput = mapper.writeValueAsString(serviceInputList);
                 serviceInput = serviceInput.replace("\"", "\\\"");
             } catch (JsonProcessingException e) {
-                logger.error("service input could not be deserialized for service uuid:  "
-                        sdcCsarHelper.getServiceMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
+                logger.error("service input could not be deserialized for service uuid:  {}",
+                        sdcCsarHelper.getServiceMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
             }
         } else {
             logger.debug("serviceInput is null");
@@ -3020,9 +3020,9 @@ public class ToscaResourceInstaller {
                 propertiesJson = mapper.writeValueAsString(serviceProperties);
                 propertiesJson = propertiesJson.replace("\"", "\\\"");
             } catch (JsonProcessingException e) {
-                logger.error("serviceProperties could not be deserialized for service uuid:  " + serviceUUID);
+                logger.error("serviceProperties could not be deserialized for service uuid:  {}", serviceUUID);
             } catch (Exception ex) {
-                logger.error("service properties parsing failed. service uuid:" + serviceUUID);
+                logger.error("service properties parsing failed. service uuid:{}", serviceUUID);
             }
 
         } else {
index 5f0cab3..0523230 100644 (file)
@@ -61,7 +61,7 @@ public class OofInfraUtils {
             }
         } catch (Exception e) {
             logger.debug("Error looking up or creating cloudsite : {}", cloudSite.getId());
-            logger.debug("CloudSite Lookup/Creation Error: " + e);
+            logger.debug("CloudSite Lookup/Creation Error: {}", e);
         }
 
 
index 2d86987..f31a144 100644 (file)
@@ -615,8 +615,8 @@ public class BBInputSetup implements JavaDelegate {
             configuration.setModelInfoConfiguration(this.mapperLayer.mapCatalogConfigurationToConfiguration(
                     configurationResourceCustomization, vnfVfmoduleCvnfcConfigurationCustomization));
         } else {
-            logger.debug("for Fabric configuration mapping by VF MODULE CUST UUID: "
-                    configurationResourceKeys.getVfModuleCustomizationUUID());
+            logger.debug("for Fabric configuration mapping by VF MODULE CUST UUID: {}",
+                    configurationResourceKeys.getVfModuleCustomizationUUID());
             vnfVfmoduleCvnfcConfigurationCustomization = findVnfVfmoduleCvnfcConfigurationCustomization(
                     service.getModelUUID(), configurationResourceKeys.getVnfResourceCustomizationUUID(),
                     configurationResourceKeys.getVfModuleCustomizationUUID(),
@@ -745,7 +745,7 @@ public class BBInputSetup implements JavaDelegate {
                         bbInputSetupUtils.getAAIVolumeGroup(cloudOwner, cloudRegionId, volumeGroup.getVolumeGroupId())
                                 .getModelCustomizationId();
                 if (modelInfo.getModelCustomizationId().equalsIgnoreCase(volumeGroupCustId)) {
-                    logger.debug("Found volume group for vfModule: " + volumeGroup.getVolumeGroupId());
+                    logger.debug("Found volume group for vfModule: {}", volumeGroup.getVolumeGroupId());
                     return Optional.of(volumeGroup.getVolumeGroupId());
                 }
             }
index 016abbf..d52e92e 100644 (file)
@@ -113,7 +113,7 @@ public class AbstractCDSProcessingBBUtils {
             ExecutionServiceInput executionServiceInput = prepareExecutionServiceInput(executionObject);
 
             execution.setVariable(EXEC_INPUT, executionServiceInput);
-            logger.debug("Input payload: " + executionServiceInput.getPayload());
+            logger.debug("Input payload: {}", executionServiceInput.getPayload());
 
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
index f80980d..70ab617 100644 (file)
@@ -208,10 +208,10 @@ public class NssiCDSRequestProvider implements CDSRequestProvider {
     /*
      * private JsonObject setSliceProfileProperties(Map<String, Object> userParamsMap) { JsonObject
      * sliceProfilePropertiesNotPresentInAai = new JsonObject();
-     * 
+     *
      * if (userParamsMap != null) { userParamsMap.forEach((k, v) -> { if (!AAI_SUPPORTED_SLICE_PROFILE.contains((String)
      * k)) { sliceProfilePropertiesNotPresentInAai.addProperty(k, v.toString()); } }); }
-     * 
+     *
      * return sliceProfilePropertiesNotPresentInAai; }
      */
 
@@ -257,7 +257,7 @@ public class NssiCDSRequestProvider implements CDSRequestProvider {
                         sliceProfileInstancesOptional.get().getServiceInstance().get(0).getServiceInstanceId();
             }
         } catch (Exception e) {
-            LOGGER.error("Error in getting sliceProfile Instance" + e.getMessage());
+            LOGGER.error("Error in getting sliceProfile Instance {}", e.getMessage());
         }
         return sliceProfileInstanceId;
     }
@@ -276,7 +276,7 @@ public class NssiCDSRequestProvider implements CDSRequestProvider {
                 nssiName = sliceProfileInstancesOptional.get().getServiceInstanceName();
             }
         } catch (Exception e) {
-            LOGGER.error("Error in getting Nssi Instance" + e.getMessage());
+            LOGGER.error("Error in getting Nssi Instance{}", e.getMessage());
         }
         return nssiName;
     }
index d9656f7..16dd9d2 100644 (file)
@@ -65,9 +65,9 @@ public class SendRequestToSdnr implements JavaDelegate {
                 timeout = "PT30M";
             }
         }
-        logger.debug("Async Callback Timeout will be: " + timeout);
+        logger.debug("Async Callback Timeout will be: {}", timeout);
         String msg = (String) execution.getVariable("sdnrRequest");
-        logger.debug("msg to be sent on dmaap " + msg);
+        logger.debug("msg to be sent on dmaap {}", msg);
         sdnrDmaapPublisher.get().send(msg);
 
     }
index 9ab0aa1..553caf4 100644 (file)
@@ -77,7 +77,7 @@ public class SDNCLcmDmaapClient {
             try {
                 lcmDmaapResponse = mapper.readValue(message, LcmDmaapResponse.class);
             } catch (Exception e) {
-                logger.warn("Invalid SDNC LCM DMaaP response: " + message);
+                logger.warn("Invalid SDNC LCM DMaaP response: {}", message);
                 continue;
             }
 
index 5562444..068beec 100644 (file)
@@ -71,7 +71,7 @@ public class LcmBeanTest {
         ObjectMapper mapper = new ObjectMapper();
 
         String msgString = mapper.writeValueAsString(msgObject);
-        logger.debug(msgObject.getClass().getSimpleName() + "\n" + msgString);
+        logger.debug("{}\n{}", msgObject.getClass().getSimpleName(), msgString);
 
         return msgString;
     }
index 5452166..fcd9892 100644 (file)
@@ -35,7 +35,7 @@ public class LcmBasePayloadTest {
         ObjectMapper mapper = new ObjectMapper();
 
         String msgString = mapper.writeValueAsString(msgObject);
-        logger.debug(msgObject.getClass().getSimpleName() + "\n" + msgString);
+        logger.debug("{}\n{}", msgObject.getClass().getSimpleName(), msgString);
 
         return msgString;
     }
index 6f8d34e..7797682 100644 (file)
@@ -54,18 +54,18 @@ public class ResponseBuilder implements java.io.Serializable {
         String method =
                 getClass().getSimpleName() + ".buildWorkflowException(" + "execution=" + execution.getId() + ")";
 
-        logger.debug("Entered " + method);
+        logger.debug("Entered {}", method);
 
         String prefix = (String) execution.getVariable("prefix");
         String processKey = getProcessKey(execution);
 
-        logger.debug("processKey=" + processKey);
+        logger.debug("processKey={}", processKey);
 
         // See if there"s already a WorkflowException object in the execution.
         WorkflowException theException = (WorkflowException) execution.getVariable(WORKFLOWEXCEPTION);
 
         if (theException != null) {
-            logger.debug("Exited " + method + " - propagated " + theException);
+            logger.debug("Exited {} - propagated {}", method, theException);
             return theException;
         }
 
@@ -73,8 +73,8 @@ public class ResponseBuilder implements java.io.Serializable {
 
         String errorResponse = trimString(execution.getVariable(prefix + "ErrorResponse"), null);
         String responseCode = trimString(execution.getVariable(prefix + "ResponseCode"), null);
-        logger.debug("errorResponse=" + errorResponse);
-        logger.debug("responseCode=" + responseCode);
+        logger.debug("errorResponse={}", errorResponse);
+        logger.debug("responseCode={}", responseCode);
         if (errorResponse != null || !isOneOf(responseCode, null, "0", "200", "201", "202", "204")) {
             // This is an error condition. We need to return a WorkflowExcpetion
 
@@ -98,8 +98,8 @@ public class ResponseBuilder implements java.io.Serializable {
             String xmlErrorCode = trimString(getXMLTextElement(maybeXML, "ErrorCode"), null);
 
             if (xmlErrorMessage != null || xmlErrorCode != null) {
-                logger.debug("xmlErrorMessage=" + xmlErrorMessage);
-                logger.debug("xmlErrorCode=" + xmlErrorCode);
+                logger.debug("xmlErrorMessage={}", xmlErrorMessage);
+                logger.debug("xmlErrorCode={}", xmlErrorCode);
 
                 if (xmlErrorMessage == null) {
                     errorResponse = "Received error code " + xmlErrorCode + " from " + processKey;
@@ -140,11 +140,11 @@ public class ResponseBuilder implements java.io.Serializable {
 
             theException = new WorkflowException(processKey, intResponseCode, errorResponse);
             execution.setVariable(WORKFLOWEXCEPTION, theException);
-            logger.debug("Exited " + method + " - created " + theException);
+            logger.debug("Exited {} - created {}", method, theException);
             return theException;
         }
 
-        logger.debug("Exited " + method + " - no WorkflowException");
+        logger.debug("Exited {} - no WorkflowException", method);
         return null;
     }
 
@@ -157,7 +157,7 @@ public class ResponseBuilder implements java.io.Serializable {
     public Object buildWorkflowResponse(DelegateExecution execution) {
 
         String method = getClass().getSimpleName() + ".buildWorkflowResponse(" + "execution=" + execution.getId() + ")";
-        logger.debug("Entered " + method);
+        logger.debug("Entered {}", method);
 
         String prefix = (String) execution.getVariable("prefix");
         String processKey = getProcessKey(execution);
@@ -178,7 +178,7 @@ public class ResponseBuilder implements java.io.Serializable {
             }
         }
 
-        logger.debug("Exited " + method);
+        logger.debug("Exited {}", method);
         return theResponse;
     }
 
index 79a4c54..92d8fb4 100644 (file)
@@ -208,7 +208,7 @@ public final class XmlTool {
             }
             return out.toString();
         } catch (Exception e) {
-            logger.debug("Exception at readResourceFile stream: " + e);
+            logger.debug("Exception at readResourceFile stream: {}", e);
             return null;
         }
     }
index 4e6396c..79426c0 100644 (file)
@@ -9,9 +9,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -80,8 +80,8 @@ public class CallbackHandlerService {
 
         long startTime = System.currentTimeMillis();
 
-        logger.debug(logMarker + " " + method + " received message: " + (message == null ? "" : System.lineSeparator())
-                message);
+        logger.debug("{} {} received message: {}{}", logMarker, method, (message == null ? "" : System.lineSeparator()),
+                message);
 
         try {
             Map<String, Object> variables = new HashMap<>();
@@ -122,7 +122,7 @@ public class CallbackHandlerService {
      * exceptions are handled differently from process execution exceptions. Correlation exceptions are thrown so the
      * client knows something went wrong with the delivery of the message. Process execution exceptions are logged but
      * not thrown.
-     * 
+     *
      * @param messageEventName the message event name
      * @param correlationVariable the process variable used as the correlator
      * @param correlationValue the correlation value
@@ -133,8 +133,8 @@ public class CallbackHandlerService {
     protected boolean correlate(String messageEventName, String correlationVariable, String correlationValue,
             Map<String, Object> variables, String logMarker) {
         try {
-            logger.debug(logMarker + " Attempting to find process waiting" + " for " + messageEventName + " with "
-                    + correlationVariable + " = '" + correlationValue + "'");
+            logger.debug("{} Attempting to find process waiting" + " for {} with {} = '{}'", logMarker,
+                    messageEventName, correlationVariable, correlationValue);
 
 
 
@@ -198,18 +198,20 @@ public class CallbackHandlerService {
                 execInfoList.add(new ExecInfo(execution));
             }
 
-            logger.debug(logMarker + " Found " + count + " process(es) waiting" + " for " + messageEventName + " with "
-                    + correlationVariable + " = '" + correlationValue + "': " + execInfoList);
+            logger.debug("{} Found {} process(es) waiting for {} with {} = '{}': {}", logMarker, count,
+                    messageEventName, correlationVariable, correlationValue, execInfoList);
 
             if (count == 0) {
                 if (queryFailCount > 0) {
-                    String msg =
-                            queryFailCount + "/" + queryCount + " execution queries failed attempting to correlate "
-                                    + messageEventName + " with " + correlationVariable + " = '" + correlationValue
-                                    + "'; last exception was:" + queryException;
-                    logger.debug(msg);
-                    logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN",
-                            ErrorCode.UnknownError.getValue(), msg, queryException);
+                    if (logger.isWarnEnabled() || logger.isDebugEnabled()) {
+                        String msg =
+                                queryFailCount + "/" + queryCount + " execution queries failed attempting to correlate "
+                                        + messageEventName + " with " + correlationVariable + " = '" + correlationValue
+                                        + "'; last exception was:" + queryException;
+                        logger.debug(msg);
+                        logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN",
+                                ErrorCode.UnknownError.getValue(), msg, queryException);
+                    }
                 }
 
                 return false;
@@ -229,8 +231,8 @@ public class CallbackHandlerService {
             // acknowledged the notification associated with request #1.
 
             try {
-                logger.debug(logMarker + " Running " + execInfoList.get(0) + " to receive " + messageEventName
-                        + " with " + correlationVariable + " = '" + correlationValue + "'");
+                logger.debug("{} Running {} to receive {} with {} = '{}'", logMarker, execInfoList.get(0),
+                        messageEventName, correlationVariable, correlationValue);
 
                 @SuppressWarnings("unused")
                 MessageCorrelationResult result = runtimeService.createMessageCorrelation(messageEventName)
@@ -319,7 +321,7 @@ public class CallbackHandlerService {
 
     /**
      * Records audit and metric events in the log for a callback success.
-     * 
+     *
      * @param method the method name
      * @param startTime the request start time
      */
@@ -327,7 +329,7 @@ public class CallbackHandlerService {
 
     /**
      * Records error, audit and metric events in the log for a callback internal error.
-     * 
+     *
      * @param method the method name
      * @param startTime the request start time
      * @param msg the error message
@@ -338,7 +340,7 @@ public class CallbackHandlerService {
 
     /**
      * Records error, audit and metric events in the log for a callback internal error.
-     * 
+     *
      * @param method the method name
      * @param startTime the request start time
      * @param msg the error message
index 15064e5..6be3635 100644 (file)
@@ -125,7 +125,7 @@ public class WorkflowAsyncResource extends ProcessEngineAwareService {
         String requestId = getRequestId(inputVariables);
         long currentWaitTime = 0;
         long waitTime = getWaitTime();
-        logger.debug("WorkflowAsyncResource.waitForResponse using timeout: " + waitTime);
+        logger.debug("WorkflowAsyncResource.waitForResponse using timeout: {}", waitTime);
         while (waitTime > currentWaitTime) {
             Thread.sleep(workflowPollInterval);
             currentWaitTime = currentWaitTime + workflowPollInterval;
index 9547017..4715a19 100644 (file)
@@ -9,9 +9,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -47,7 +47,7 @@ import io.swagger.v3.oas.annotations.info.Info;
 
 /**
  * Generalized REST interface that injects a message event into a waiting BPMN process. Examples:
- * 
+ *
  * <pre>
  *     /WorkflowMessage/SDNCAResponse/6d10d075-100c-42d0-9d84-a52432681cae-1478486185286
  *     /WorkflowMessage/SDNCAEvent/USOSTCDALTX0101UJZZ01
@@ -74,13 +74,13 @@ public class WorkflowMessageResource {
 
         String method = "receiveWorkflowMessage";
 
-        logger.debug(LOGMARKER + " Received workflow message" + " type='" + messageType + "'" + " correlator='"
-                + correlator + "'" + (contentType == null ? "" : " contentType='" + contentType + "'") + " message="
-                + System.lineSeparator() + message);
+        logger.debug("{} Received workflow message type='{}' correlator='{}'{} message={}{}", LOGMARKER, messageType,
+                correlator, (contentType == null ? "" : " contentType='" + contentType + "'"), System.lineSeparator(),
+                message);
 
         if (messageType == null || messageType.isEmpty()) {
             String msg = "Missing message type";
-            logger.debug(LOGMARKER + " " + msg);
+            logger.debug("{} {}", LOGMARKER, msg);
             logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN",
                     ErrorCode.DataError.getValue(), LOGMARKER + ":" + msg);
             return Response.status(400).entity(msg).build();
@@ -88,7 +88,7 @@ public class WorkflowMessageResource {
 
         if (correlator == null || correlator.isEmpty()) {
             String msg = "Missing correlator";
-            logger.debug(LOGMARKER + " " + msg);
+            logger.debug("{} {}", LOGMARKER, msg);
             logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN",
                     ErrorCode.DataError.getValue(), LOGMARKER + ":" + msg);
             return Response.status(400).entity(msg).build();
index 25f7c4b..044f80a 100644 (file)
@@ -63,8 +63,8 @@ public class WorkflowProcessor extends ProcessEngineAwareService {
                     runtimeService.startProcessInstanceByKey(processKey, businessKey, inputVariables);
             processInstanceId = processInstance.getId();
 
-            logger.debug(logMarker + "Process " + processKey + ":" + processInstanceId + " "
-                    (processInstance.isEnded() ? "ENDED" : "RUNNING"));
+            logger.debug("{}Process {}:{} {}", logMarker, processKey, processInstanceId,
+                    (processInstance.isEnded() ? "ENDED" : "RUNNING"));
         } catch (Exception e) {
             WorkflowResponse workflowResponse = new WorkflowResponse();
             workflowResponse.setResponse("Error occurred while executing the process: " + e);
index 0f2aee7..45720f8 100644 (file)
@@ -10,9 +10,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -77,7 +77,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
      * mso-service-request-timeout then it waits for the value specified in DEFAULT_WAIT_TIME Note: value specified in
      * mso-service-request-timeout is in seconds During polling time, if there is an exception encountered in the
      * process execution then polling is stopped and the error response is returned to the client
-     * 
+     *
      * @param processKey
      * @param variableMap
      * @return
@@ -117,7 +117,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
             long timeToWaitAfterProcessEnded = uriInfo == null ? 5000 : 60000;
             AtomicLong timeProcessEnded = new AtomicLong(0);
             boolean endedWithNoResponse = false;
-            logger.debug(LOGMARKER + "WorkflowResource.startProcessInstanceByKey using timeout: " + waitTime);
+            logger.debug("{} WorkflowResource.startProcessInstanceByKey using timeout: {}", LOGMARKER, waitTime);
             while (now <= endTime) {
                 Thread.sleep(pollingInterval);
 
@@ -191,7 +191,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
             workflowResponse.setMessageCode(500);
             return Response.status(500).entity(workflowResponse).build();
         } catch (Exception ex) {
-            logger.debug(LOGMARKER + "Exception in startProcessInstance by key", ex);
+            logger.debug("{} Exception in startProcessInstance by key", LOGMARKER, ex);
             workflowResponse.setMessage("Fail");
             workflowResponse.setResponse("Error occurred while executing the process: " + ex.getMessage());
             if (processInstance != null)
@@ -210,7 +210,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
     /**
      * Returns the wait time, this is used by the resource on how long it should wait to send a response If none
      * specified DEFAULT_WAIT_TIME is used
-     * 
+     *
      * @param inputVariables
      * @return
      */
@@ -243,7 +243,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
 
     /**
      * Checks to see if the specified process is ended.
-     * 
+     *
      * @param processInstanceId the process instance ID
      * @return true if the process is ended
      */
@@ -274,7 +274,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
         try {
             workflowResponse.setMessageCode(Integer.parseInt(responseCode));
         } catch (NumberFormatException nex) {
-            logger.debug(LOGMARKER + "Failed to parse ResponseCode: " + responseCode);
+            logger.debug("{} Failed to parse ResponseCode: {}", LOGMARKER, responseCode);
             workflowResponse.setMessageCode(-1);
         }
 
@@ -285,7 +285,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
         } else if ("Fail".equalsIgnoreCase(String.valueOf(status))) {
             workflowResponse.setMessage("Fail");
         } else {
-            logger.debug(LOGMARKER + "Unrecognized Status: " + responseCode);
+            logger.debug("{} Unrecognized Status: {}", LOGMARKER, responseCode);
             workflowResponse.setMessage("Fail");
         }
     }
@@ -310,7 +310,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
          * If an exception occurs when starting the process instance, it may be obtained by calling this method. Note
          * that exceptions are only recorded while the process is executing in its original thread. Once a process is
          * suspended, exception recording stops.
-         * 
+         *
          * @return the exception, or null if none has occurred
          */
         public Exception getException() {
@@ -324,7 +324,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
 
         /**
          * Sets the process instance exception.
-         * 
+         *
          * @param exception the exception
          */
         private void setException(Exception exception) {
@@ -344,7 +344,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
                 processInstance = runtimeService.startProcessInstanceByKey(processKey, inputVariables);
 
             } catch (Exception e) {
-                logger.debug(LOGMARKER + "ProcessThread caught an exception executing " + processKey + ": " + e);
+                logger.debug("{} ProcessThread caught an exception executing {}: {}", LOGMARKER, processKey, e);
                 setException(e);
             }
         }
@@ -377,7 +377,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
 
     /**
      * Attempts to get a response map from the specified process instance.
-     * 
+     *
      * @return the response map, or null if it is unavailable
      */
     private Map<String, Object> getResponseMap(ProcessInstance processInstance, String processKey,
@@ -391,12 +391,12 @@ public class WorkflowResource extends ProcessEngineAwareService {
         /*
          * RuntimeService runtimeService = getProcessEngineServices().getRuntimeService(); List<Execution> executions =
          * runtimeService.createExecutionQuery() .processInstanceId(processInstanceId).list();
-         * 
+         *
          * for (Execution execution : executions) {
-         * 
+         *
          * @SuppressWarnings("unchecked") Map<String, Object> responseMap = (Map<String, Object>)
          * getVariableFromExecution(runtimeService, execution.getId(), responseMapVariable);
-         * 
+         *
          * if (responseMap != null) { msoLogger.debug(LOGMARKER + "Obtained " + responseMapVariable + " from process " +
          * processInstanceId + " execution " + execution.getId()); return responseMap; } }
          */
@@ -417,8 +417,8 @@ public class WorkflowResource extends ProcessEngineAwareService {
                     processInstance.getId(), responseMapVariable);
 
             if (responseMap != null) {
-                logger.debug(LOGMARKER + "Obtained " + responseMapVariable + " from process " + processInstanceId
-                        + " history");
+                logger.debug("{}Obtained {} from process {} history", LOGMARKER, responseMapVariable,
+                        processInstanceId);
                 return responseMap;
             }
 
@@ -433,13 +433,13 @@ public class WorkflowResource extends ProcessEngineAwareService {
                         getVariableFromHistory(historyService, processInstanceId, "WorkflowResponse");
                 String workflowResponse =
                         workflowResponseObject == null ? null : String.valueOf(workflowResponseObject);
-                logger.debug(LOGMARKER + "WorkflowResponse: " + workflowResponse);
+                logger.debug("{}WorkflowResponse: {}", LOGMARKER, workflowResponse);
 
                 if (workflowResponse != null) {
                     Object responseCodeObject =
                             getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
                     String responseCode = responseCodeObject == null ? null : String.valueOf(responseCodeObject);
-                    logger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
+                    logger.debug("{}{}ResponseCode: {}", LOGMARKER, prefix, responseCode);
                     responseMap = new HashMap<>();
                     responseMap.put("WorkflowResponse", workflowResponse);
                     responseMap.put("ResponseCode", responseCode);
@@ -476,17 +476,17 @@ public class WorkflowResource extends ProcessEngineAwareService {
                     }
 
                 }
-                logger.debug(LOGMARKER + "WorkflowException: " + workflowExceptionText);
+                logger.debug("{}WorkflowException: {}", LOGMARKER, workflowExceptionText);
 
                 // BEGIN LEGACY SUPPORT. TODO: REMOVE THIS CODE
                 Object object = getVariableFromHistory(historyService, processInstanceId, processKey + "Response");
                 String response = object == null ? null : String.valueOf(object);
-                logger.debug(LOGMARKER + processKey + "Response: " + response);
+                logger.debug("{}{}Response: {}", LOGMARKER, processKey, response);
 
                 if (response != null) {
                     object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
                     String responseCode = object == null ? null : String.valueOf(object);
-                    logger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
+                    logger.debug("{}{}ResponseCode: {}", LOGMARKER, prefix, responseCode);
                     responseMap = new HashMap<>();
                     responseMap.put("Response", response);
                     responseMap.put("ResponseCode", responseCode);
@@ -496,12 +496,12 @@ public class WorkflowResource extends ProcessEngineAwareService {
 
                 object = getVariableFromHistory(historyService, processInstanceId, prefix + "ErrorResponse");
                 String errorResponse = object == null ? null : String.valueOf(object);
-                logger.debug(LOGMARKER + prefix + "ErrorResponse: " + errorResponse);
+                logger.debug("{}{}ErrorResponse: {}", LOGMARKER, prefix, errorResponse);
 
                 if (errorResponse != null) {
                     object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
                     String responseCode = object == null ? null : String.valueOf(object);
-                    logger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
+                    logger.debug("{}{}ResponseCode: {}", LOGMARKER, prefix, responseCode);
                     responseMap = new HashMap<>();
                     responseMap.put("Response", errorResponse);
                     responseMap.put("ResponseCode", responseCode);
@@ -516,7 +516,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
 
     /**
      * Gets a variable value from the specified execution.
-     * 
+     *
      * @return the variable value, or null if the variable could not be obtained
      */
     private Object getVariableFromExecution(RuntimeService runtimeService, String executionId, String variableName) {
@@ -524,14 +524,14 @@ public class WorkflowResource extends ProcessEngineAwareService {
             return runtimeService.getVariable(executionId, variableName);
         } catch (ProcessEngineException e) {
             // Most likely cause is that the execution no longer exists.
-            logger.debug("Error retrieving execution " + executionId + " variable " + variableName + ": " + e);
+            logger.debug("Error retrieving execution {} variable {}: {}", executionId, variableName, e);
             return null;
         }
     }
 
     /**
      * Gets a variable value from specified historical process instance.
-     * 
+     *
      * @return the variable value, or null if the variable could not be obtained
      */
     private Object getVariableFromHistory(HistoryService historyService, String processInstanceId,
@@ -565,16 +565,16 @@ public class WorkflowResource extends ProcessEngineAwareService {
                 variablesMap.put(variableInstance.getName(), variableInstance.getValue().toString());
             }
 
-            logger.debug(LOGMARKER + "***Received MSO getProcessVariables with processKey:" + processKey
-                    + " and variables: " + variablesMap.toString());
+            logger.debug("{}***Received MSO getProcessVariables with processKey:{} and variables: {}", LOGMARKER,
+                    processKey, variablesMap.toString());
 
             response.setVariables(variablesMap);
             response.setMessage("Success");
             response.setResponse("Successfully retrieved the variables");
             response.setProcessInstanceID(processInstanceId);
 
-            logger.debug(LOGMARKER + response.getMessage() + " for processKey: " + processKey + " with response: "
-                    response.getResponse());
+            logger.debug("{}{} for processKey: {} with response: {}", LOGMARKER, response.getMessage(), processKey,
+                    response.getResponse());
         } catch (Exception ex) {
             response.setMessage("Fail");
             response.setResponse("Failed to retrieve the variables," + ex.getMessage());
index d34c7d8..a60c19b 100644 (file)
@@ -776,7 +776,7 @@ public abstract class WorkflowTest {
      */
     protected Object getProcessVariable(String processKey, String variable, long timeout) {
 
-        logger.debug("Waiting " + timeout + "ms for " + processKey + "." + variable + " to be set");
+        logger.debug("Waiting {}ms for {}.{} to be set", timeout, processKey, variable);
 
         long now = System.currentTimeMillis() + timeout;
         long endTime = now + timeout;
@@ -787,10 +787,10 @@ public abstract class WorkflowTest {
         while (value == null) {
             if (now > endTime) {
                 if (processInstance == null) {
-                    logger.debug("Timed out waiting for " + processKey + " to start");
+                    logger.debug("Timed out waiting for {} to start", processKey);
                 } else {
-                    logger.debug("Timed out waiting for " + processKey + "[" + processInstance.getId() + "]." + variable
-                            + " to be set");
+                    logger.debug("Timed out waiting for {}[{}].{} to be set", processKey, processInstance.getId(),
+                            variable);
                 }
 
                 return null;
@@ -827,7 +827,7 @@ public abstract class WorkflowTest {
             now = System.currentTimeMillis();
         }
 
-        logger.debug(processKey + "[" + processInstance.getId() + "]." + variable + "=" + value);
+        logger.debug("{}[{}].{}={}", processKey, processInstance.getId(), variable, value);
 
         return value;
     }
@@ -860,7 +860,7 @@ public abstract class WorkflowTest {
         logger.debug("Injecting SDNC adapter callback");
 
         Response response = workflowMessageResource.deliver(contentType, "SDNCAResponse", sdncRequestId, content);
-        logger.debug("Workflow response to SDNC adapter callback: " + response);
+        logger.debug("Workflow response to SDNC adapter callback: {}", response);
         return true;
     }
 
@@ -900,7 +900,7 @@ public abstract class WorkflowTest {
         sdncAdapterCallbackRequest.setCallbackHeader(callbackHeader);
         sdncAdapterCallbackRequest.setRequestData(content);
         SDNCAdapterResponse sdncAdapterResponse = callbackService.sdncAdapterCallback(sdncAdapterCallbackRequest);
-        logger.debug("Workflow response to SDNC adapter callback: " + sdncAdapterResponse);
+        logger.debug("Workflow response to SDNC adapter callback: {}", sdncAdapterResponse);
 
         return true;
     }
@@ -1192,7 +1192,7 @@ public abstract class WorkflowTest {
             content = content.replace("((CORRELATOR))", correlator);
         }
 
-        logger.debug("Injecting " + messageType + " message");
+        logger.debug("Injecting {} message", messageType);
 
         Response response = workflowMessageResource.deliver(contentType, messageType, correlator, content);
         logger.debug("Workflow response to {} message: {}", messageType, response);
index 12f30cf..5f33110 100644 (file)
@@ -62,9 +62,9 @@ public class DeployActivitySpecs {
                 String activitySpecName = f.getName();
                 String errorMessage = deployActivitySpec(hostname, activitySpecName);
                 if (errorMessage == null) {
-                    logger.debug("Deployed Activity Spec: " + activitySpecName);
+                    logger.debug("Deployed Activity Spec: {}", activitySpecName);
                 } else {
-                    logger.error("Error deploying Activity Spec: " + activitySpecName + " : " + errorMessage);
+                    logger.error("Error deploying Activity Spec: {} : {}", activitySpecName, errorMessage);
                 }
             }
         } else {
index 212cd60..d656a89 100644 (file)
@@ -201,7 +201,7 @@ public class ServicePluginFactory {
             return true;
         }
         String host = (String) tpInfoMap.get("host");
-        logger.info("host string from tpinfo:" + host);
+        logger.info("host string from tpinfo:{}", host);
         // host is empty means TP is in local, not empty means TP is in remote ONAP
         if (!host.isEmpty()) {
             return false;
@@ -282,12 +282,12 @@ public class ServicePluginFactory {
                     tpInfoMap = tpJson;
                     // add resourceName
                     tpInfoMap.put("resourceName", vpnAttachmentResourceName);
-                    logger.info("*** we will try to find resourcename(" + vpnAttachmentResourceName
-                            + ") to add resource input ***");
+                    logger.info("*** we will try to find resourcename({}) to add resource input ***",
+                            vpnAttachmentResourceName);
                     break;
                 }
             }
-            logger.info("Get Terminal TP from InventoryOSS: " + tpInfoMap);
+            logger.info("Get Terminal TP from InventoryOSS: {}", tpInfoMap);
             return tpInfoMap;
         }
 
@@ -390,7 +390,7 @@ public class ServicePluginFactory {
             crossTps.put("local-access-ltp-id", localTPs.split(",")[0]);
             crossTps.put("remote-access-ltp-id", remoteTPs.split(",")[0]);
         }
-        logger.info("cross TP info:" + crossTps);
+        logger.info("cross TP info:{}", crossTps);
     }
 
     @SuppressWarnings("unchecked")
index aa16664..c823624 100644 (file)
@@ -345,7 +345,7 @@ public abstract class AbstractSdncOperationTask implements JavaDelegate {
         }
         msbPort = Integer.valueOf(strMsbPort);
 
-        logger.info("AbstractSdncOperationTask.getGenericResourceApiClient msbIp = " + msbIp + " msbPort = " + msbPort);
+        logger.info("AbstractSdncOperationTask.getGenericResourceApiClient msbIp = {} msbPort = {}", msbIp, msbPort);
         MSBServiceClient msbClient = new MSBServiceClient(msbIp, msbPort);
         RestServiceCreater restServiceCreater = new RestServiceCreater(msbClient);
         logger.info("AbstractSdncOperationTask.getGenericResourceApiClient end!");
index 5afa094..dcd100c 100644 (file)
@@ -150,7 +150,7 @@ public class GenericPnfSWUPDownloadTest extends BaseBPMNTest {
 
     private void checkWithActionName(ExecutionServiceInput executionServiceInput, String action, String msoRequestId) {
 
-        logger.info("Checking the " + action + " request");
+        logger.info("Checking the {} request", action);
         ActionIdentifiers actionIdentifiers = executionServiceInput.getActionIdentifiers();
 
         /**
index 804f518..be1c785 100644 (file)
@@ -155,7 +155,7 @@ public class GenericPnfSoftwareUpgradeTest extends BaseBPMNTest {
 
     private void checkWithActionName(ExecutionServiceInput executionServiceInput, String action) {
 
-        logger.info("Checking the " + action + " request");
+        logger.info("Checking the {} request", action);
         ActionIdentifiers actionIdentifiers = executionServiceInput.getActionIdentifiers();
 
         /**
index bc364ae..8d583d1 100644 (file)
@@ -144,7 +144,7 @@ public class PnfHealthCheckTest extends BaseBPMNTest {
 
     private void checkWithActionName(ExecutionServiceInput executionServiceInput, String action) {
 
-        logger.info("Checking the " + action + " request");
+        logger.info("Checking the {} request", action);
         ActionIdentifiers actionIdentifiers = executionServiceInput.getActionIdentifiers();
 
         /**
index 974ffd3..76596b0 100644 (file)
@@ -177,7 +177,7 @@ public class ServiceLevelUpgradeTest extends BaseBPMNTest {
     private void checkWithActionName(final ExecutionServiceInput executionServiceInput, final String action,
             final String pnfName) {
 
-        logger.info("Checking the " + action + " request");
+        logger.info("Checking the {} request", action);
         ActionIdentifiers actionIdentifiers = executionServiceInput.getActionIdentifiers();
 
         /**
index 4247b24..67bd989 100644 (file)
@@ -98,7 +98,7 @@ public class EnrichGBBTask {
 
         // API Path
         String apiPath = "/api/oof/v1/selection/nsst";
-        LOGGER.debug("API path for NSST Selection: " + apiPath);
+        LOGGER.debug("API path for NSST Selection: {}", apiPath);
         execution.setVariable("NSST_apiPath", apiPath);
 
         // Setting correlator as requestId
@@ -116,7 +116,7 @@ public class EnrichGBBTask {
         profileInfo.put("areaTrafficCapDL", areaTrafficCapDL);
 
         String oofRequest = oofUtils.buildSelectNSTRequest(requestId, messageType, profileInfo);
-        LOGGER.debug("**** OOfRequest for NSST Selection: " + oofRequest);
+        LOGGER.debug("**** OOfRequest for NSST Selection: {}", oofRequest);
         execution.setVariable("NSST_oofRequest", oofRequest);
     }
 
@@ -129,7 +129,7 @@ public class EnrichGBBTask {
         LOGGER.debug(" **** Enter EnrichGBB ::: processOOFAsyncResponse ****");
         String OOFResponse = (String) execution.getVariable("NSST_asyncCallbackResponse");
         String requestStatus = jsonUtil.getJsonValue(OOFResponse, "requestStatus");
-        LOGGER.debug("NSST OOFResponse is: " + OOFResponse);
+        LOGGER.debug("NSST OOFResponse is: {}", OOFResponse);
         execution.setVariable("OOFResponse", OOFResponse);
         String solutions = "";
         if (requestStatus.equals("completed")) {
@@ -139,8 +139,8 @@ public class EnrichGBBTask {
             }
         } else {
             String statusMessage = jsonUtil.getJsonValue(OOFResponse, "statusMessage");
-            LOGGER.error("received failed status from oof " + statusMessage);
-            LOGGER.debug("received failed status from oof " + statusMessage);
+            LOGGER.error("received failed status from oof {}", statusMessage);
+            LOGGER.debug("received failed status from oof {}", statusMessage);
         }
 
         LOGGER.debug(">>>>>> solutions: {}", solutions);
index d5a085a..99d4772 100644 (file)
@@ -142,7 +142,7 @@ public class OofHomingV2 {
             if (!placementInfo.getPlacementDemands().isEmpty() || !licenseInfo.getLicenseDemands().isEmpty()) {
                 oofClient.postDemands(oofRequest);
             } else {
-                logger.debug(SERVICE_MISSING_DATA + " resources eligible for homing or licensing");
+                logger.debug("{} resources eligible for homing or licensing", SERVICE_MISSING_DATA);
                 throw new BpmnError(UNPROCESSABLE,
                         SERVICE_MISSING_DATA + " resources eligible for homing or licensing");
             }
@@ -154,13 +154,13 @@ public class OofHomingV2 {
 
             logger.trace("Completed Oof Homing Call Oof");
         } catch (BpmnError e) {
-            logger.debug(ERROR_WHILE_PREPARING_OOF_REQUEST + e.getStackTrace());
+            logger.debug("{}{}", ERROR_WHILE_PREPARING_OOF_REQUEST, e.getStackTrace());
             exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(e.getErrorCode()), e.getMessage());
         } catch (BadResponseException e) {
-            logger.debug(ERROR_WHILE_PREPARING_OOF_REQUEST + e.getStackTrace());
+            logger.debug("{}{}", ERROR_WHILE_PREPARING_OOF_REQUEST, e.getStackTrace());
             exceptionUtil.buildAndThrowWorkflowException(execution, 400, e.getMessage());
         } catch (Exception e) {
-            logger.debug(ERROR_WHILE_PREPARING_OOF_REQUEST + e.getStackTrace());
+            logger.debug("{}{}", ERROR_WHILE_PREPARING_OOF_REQUEST, e.getStackTrace());
             exceptionUtil.buildAndThrowWorkflowException(execution, INTERNAL, "Internal Error - occurred while "
                     + "preparing oof request: " + e + "   Stack:" + ExceptionUtils.getFullStackTrace(e));
         }
@@ -350,7 +350,7 @@ public class OofHomingV2 {
      *
      */
     private LicenseDemand buildLicenseDemand(String id, ModelInfoMetadata metadata) {
-        logger.debug("Building demand for service or resource: " + id);
+        logger.debug("Building demand for service or resource: {}", id);
         LicenseDemand demand = new LicenseDemand();
         if (isNotBlank(id) && isNotBlank(metadata.getModelInstanceName())) {
 
@@ -368,7 +368,7 @@ public class OofHomingV2 {
      *
      */
     private PlacementDemand buildDemand(String id, ModelInfoMetadata metadata) {
-        logger.debug("Building demand for service or resource: " + id);
+        logger.debug("Building demand for service or resource: {}", id);
         PlacementDemand placementDemand = new PlacementDemand();
         if (isNotBlank(id) && isNotBlank(metadata.getModelInstanceName())) {
             placementDemand.setServiceResourceId(id);
@@ -453,7 +453,7 @@ public class OofHomingV2 {
         List<AllottedResource> allottes = serviceInstance.getAllottedResources();
         List<GenericVnf> vnfs = serviceInstance.getVnfs();
 
-        logger.debug("Processing placement solution " + i + 1);
+        logger.debug("Processing placement solution {}1", i);
         for (int p = 0; p < placements.length(); p++) {
             JSONObject placement = placements.getJSONObject(p);
             SolutionInfo solutionInfo = new SolutionInfo();
@@ -541,7 +541,7 @@ public class OofHomingV2 {
                     }
                 }
             } else {
-                logger.debug(invalidMessage + IDENTIFIER_TYPE);
+                logger.debug("{}{}", invalidMessage, IDENTIFIER_TYPE);
                 throw new BpmnError(UNPROCESSABLE, invalidMessage + IDENTIFIER_TYPE);
             }
         } else if (type.equals("cloudRegionId")) {
@@ -552,7 +552,7 @@ public class OofHomingV2 {
                 solutionInfo.setTargetedCloudRegion(cloud);
                 si.setOrchestrationStatus(OrchestrationStatus.PRECREATED);
             } else {
-                logger.debug(invalidMessage + IDENTIFIER_TYPE);
+                logger.debug("{}{}", invalidMessage, IDENTIFIER_TYPE);
                 throw new BpmnError(UNPROCESSABLE, invalidMessage + IDENTIFIER_TYPE);
             }
         }
index 69f570f..0e74e20 100644 (file)
@@ -150,7 +150,7 @@ public class SniroHomingV2 {
             if (!placementDemands.isEmpty() || !licenseDemands.isEmpty()) {
                 client.postDemands(request);
             } else {
-                logger.debug(SERVICE_MISSING_DATA + "resources eligible for homing or licensing");
+                logger.debug("{}resources eligible for homing or licensing", SERVICE_MISSING_DATA);
                 throw new BpmnError(UNPROCESSABLE, SERVICE_MISSING_DATA + "resources eligible for homing or licensing");
             }
 
@@ -374,7 +374,7 @@ public class SniroHomingV2 {
      *
      */
     private Demand buildDemand(String id, ModelInfoMetadata metadata) {
-        logger.debug("Building demand for service or resource: " + id);
+        logger.debug("Building demand for service or resource: {}", id);
         Demand demand = new Demand();
         if (isNotBlank(id) && isNotBlank(metadata.getModelInstanceName())) {
             demand.setServiceResourceId(id);
@@ -488,7 +488,7 @@ public class SniroHomingV2 {
         List<GenericVnf> vnfs = serviceInstance.getVnfs();
         List<ServiceProxy> serviceProxies = serviceInstance.getServiceProxies();
 
-        logger.debug("Processing placement solution " + i + 1);
+        logger.debug("Processing placement solution {}1", i);
         for (int p = 0; p < placements.length(); p++) {
             JSONObject placement = placements.getJSONObject(p);
             SolutionInfo solutionInfo = new SolutionInfo();
@@ -586,7 +586,7 @@ public class SniroHomingV2 {
             solutionInfo.setTargetedCloudRegion(cloud);
             si.setOrchestrationStatus(OrchestrationStatus.PRECREATED);
         } else {
-            logger.debug(invalidMessage + IDENTIFIER_TYPE);
+            logger.debug("{}{}", invalidMessage, IDENTIFIER_TYPE);
             throw new BpmnError(UNPROCESSABLE, invalidMessage + IDENTIFIER_TYPE);
         }
         si.setSolutionInfo(solutionInfo);
index 10bb720..0a452cb 100644 (file)
@@ -147,7 +147,7 @@ public class AAIFlagTasks {
             String vnfId = vnf.getVnfId();
             inPserversLocked = aaiVnfResources.checkVnfPserversLockedFlag(vnfId);
         } catch (Exception ex) {
-            logger.warn("Exception on checking pservers: " + ex.getMessage());
+            logger.warn("Exception on checking pservers: {}", ex.getMessage());
         }
         if (inPserversLocked) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "VNF PServers in Locked in A&AI");
index 545ecf7..ef7ebd8 100644 (file)
@@ -137,11 +137,11 @@ public class ExecuteActivity implements JavaDelegate {
             }
 
             handlingCode = (String) variableMap.get(HANDLING_CODE);
-            logger.debug("Handling code: " + handlingCode);
+            logger.debug("Handling code: {}", handlingCode);
 
             execution.setVariable(WORKFLOW_EXCEPTION, workflowException);
         } catch (Exception e) {
-            logger.error("BPMN exception on activity execution: " + e.getMessage());
+            logger.error("BPMN exception on activity execution: {}", e.getMessage());
             workflowException = new WorkflowException(EXECUTE_BUILDING_BLOCK, 7000, e.getMessage());
             handlingCode = ABORT_HANDLING_CODE;
         }
index a5d23da..0b3fe0c 100644 (file)
@@ -127,7 +127,7 @@ public class AppcOrchestratorPreProcessor {
                 try {
                     getVserversForAppc(execution, vnf);
                 } catch (Exception e) {
-                    logger.warn("Unable to retrieve vservers for vnf: " + vnfId);
+                    logger.warn("Unable to retrieve vservers for vnf: {}", vnfId);
                 }
             }
 
@@ -253,7 +253,7 @@ public class AppcOrchestratorPreProcessor {
                 break;
         }
         if (errorMessage != null) {
-            logger.debug("verifyApplicationControllerTaskRequest() failed with " + errorMessage);
+            logger.debug("verifyApplicationControllerTaskRequest() failed with {}", errorMessage);
             throw new ValidationException(errorMessage, false);
         }
         return;
index d7448a5..6b9e69a 100644 (file)
@@ -181,7 +181,7 @@ public class SdncControllerDE extends LcmControllerDE {
         logger.debug(String.format("requestId: %s, action: %s, pnfName: %s", requestId, requestAction, pnfName));
 
         String requestPayload = String.valueOf(execution.getVariable(REQUEST_PAYLOAD));
-        logger.debug("SO request payload: " + requestPayload);
+        logger.debug("SO request payload: {}", requestPayload);
 
         String lcmAction;
         String lcmPayload;
index 4aa9c11..9c5162e 100644 (file)
@@ -93,7 +93,7 @@ public class ConfigAssignVnf {
 
             String blueprintName = genericVnf.getModelInfoGenericVnf().getBlueprintName();
             String blueprintVersion = genericVnf.getModelInfoGenericVnf().getBlueprintVersion();
-            logger.debug(" BlueprintName : " + blueprintName + " BlueprintVersion : " + blueprintVersion);
+            logger.debug(" BlueprintName : {} BlueprintVersion : {}", blueprintName, blueprintVersion);
 
             AbstractCDSPropertiesBean abstractCDSPropertiesBean = new AbstractCDSPropertiesBean();
 
index 6a80589..4fd9ee7 100644 (file)
@@ -99,7 +99,7 @@ public class ConfigDeployVnf {
 
             String blueprintName = vnf.getModelInfoGenericVnf().getBlueprintName();
             String blueprintVersion = vnf.getModelInfoGenericVnf().getBlueprintVersion();
-            logger.debug(" BlueprintName : " + blueprintName + " BlueprintVersion : " + blueprintVersion);
+            logger.debug(" BlueprintName : {} BlueprintVersion : {}", blueprintName, blueprintVersion);
 
             AbstractCDSPropertiesBean abstractCDSPropertiesBean = new AbstractCDSPropertiesBean();
 
index 6f492b7..55c175c 100644 (file)
@@ -158,8 +158,8 @@ public class ConfigurationScaleOut {
                     ErrorCode.UnknownError.getValue(), "APPC Error", e);
             appcMessage = e.getMessage();
         }
-        logger.error("Error Message: " + appcMessage);
-        logger.error("ERROR CODE: " + appcCode);
+        logger.error("Error Message: {}", appcMessage);
+        logger.error("ERROR CODE: {}", appcCode);
         logger.trace("End of runAppCommand ");
         if (appcCode != null && !("0").equals(appcCode)) {
             exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(appcCode), appcMessage);
index 76c67ee..769640b 100644 (file)
@@ -135,8 +135,8 @@ public class GenericVnfHealthCheck {
             }
         }
 
-        logger.error("Error Message: " + appcMessage);
-        logger.error("ERROR CODE: " + appcCode);
+        logger.error("Error Message: {}", appcMessage);
+        logger.error("ERROR CODE: {}", appcCode);
         if (appcCode != null && !("0").equals(appcCode)) {
             exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(appcCode), appcMessage);
         }
index cdba6e0..3f9f054 100644 (file)
@@ -112,50 +112,50 @@ public class ManualHandlingTasks {
         try {
             logger.debug("Setting fallout task variables:");
             String taskId = task.getId();
-            logger.debug("taskId is: " + taskId);
+            logger.debug("taskId is: {}", taskId);
             String type = TASK_TYPE_FALLOUT;
             BuildingBlockExecution gBuildingBlockExecution =
                     (BuildingBlockExecution) execution.getVariable(G_BUILDING_BLOCK_EXECUTION);
             WorkflowException workflowException = (WorkflowException) execution.getVariable(WORKFLOW_EXCEPTION);
             String nfRole = (String) execution.getVariable(RAINY_DAY_VNF_TYPE);
-            logger.debug(TASK_VARIABLE_NFROLE + ": " + nfRole);
+            logger.debug("{}: {}", TASK_VARIABLE_NFROLE, nfRole);
             String subscriptionServiceType = (String) execution.getVariable(RAINY_DAY_SERVICE_TYPE);
-            logger.debug(TASK_VARIABLE_SUBSCRIPTION_SERVICE_TYPE + ": " + subscriptionServiceType);
+            logger.debug("{}: {}", TASK_VARIABLE_SUBSCRIPTION_SERVICE_TYPE, subscriptionServiceType);
             String originalRequestId = (String) execution.getVariable(MSO_REQUEST_ID);
-            logger.debug(TASK_VARIABLE_ORIGINAL_REQUEST_ID + ": " + originalRequestId);
+            logger.debug("{}: {}", TASK_VARIABLE_ORIGINAL_REQUEST_ID, originalRequestId);
             String originalRequestorId =
                     gBuildingBlockExecution.getGeneralBuildingBlock().getRequestContext().getRequestorId();
-            logger.debug(TASK_VARIABLE_ORIGINAL_REQUESTOR_ID + ": " + originalRequestorId);
+            logger.debug("{}: {}", TASK_VARIABLE_ORIGINAL_REQUESTOR_ID, originalRequestorId);
             String description = "Manual user task to handle a failure of a BB execution";
-            logger.debug(TASK_VARIABLE_DESCRIPTION + ": " + description);
+            logger.debug("{}: {}", TASK_VARIABLE_DESCRIPTION, description);
             String taskTimeout = (String) gBuildingBlockExecution.getVariable(TASK_TIMEOUT);
             String timeout = Date.from((new Date()).toInstant().plus(Duration.parse(taskTimeout))).toGMTString();
-            logger.debug(TASK_VARIABLE_TIMEOUT + ": " + timeout);
+            logger.debug("{}: {}", TASK_VARIABLE_TIMEOUT, timeout);
             String errorSource = ASTERISK;
             if (workflowException != null && workflowException.getExtSystemErrorSource() != null) {
                 errorSource = workflowException.getExtSystemErrorSource().toString();
             }
-            logger.debug(TASK_VARIABLE_ERROR_SOURCE + ": " + errorSource);
+            logger.debug("{}: {}", TASK_VARIABLE_ERROR_SOURCE, errorSource);
             String errorCode = ASTERISK;
             if (workflowException != null) {
                 errorCode = workflowException.getErrorCode() + "";
             }
-            logger.debug(TASK_VARIABLE_ERROR_CODE + ": " + errorCode);
+            logger.debug("{}: {}", TASK_VARIABLE_ERROR_CODE, errorCode);
             String errorMessage = ASTERISK;
             if (workflowException != null) {
                 errorMessage = workflowException.getErrorMessage();
             }
-            logger.debug(TASK_VARIABLE_ERROR_MESSAGE + ": " + errorMessage);
+            logger.debug("{}: {}", TASK_VARIABLE_ERROR_MESSAGE, errorMessage);
             String buildingBlockName = gBuildingBlockExecution.getFlowToBeCalled();
-            logger.debug(TASK_VARIABLE_BUILDING_BLOCK_NAME + ": " + buildingBlockName);
+            logger.debug("{}: {}", TASK_VARIABLE_BUILDING_BLOCK_NAME, buildingBlockName);
             String buildingBlockStep = ASTERISK;
             if (workflowException != null) {
                 buildingBlockStep = workflowException.getWorkStep();
             }
             execution.setVariable(WORKSTEP, buildingBlockStep);
-            logger.debug(TASK_VARIABLE_BUILDING_BLOCK_STEP + ": " + buildingBlockStep);
+            logger.debug("{}: {}", TASK_VARIABLE_BUILDING_BLOCK_STEP, buildingBlockStep);
             String validResponses = this.environment.getProperty(validResponsesPath);
-            logger.debug(TASK_VARIABLE_VALID_RESPONSES + ": " + validResponses);
+            logger.debug("{}: {}", TASK_VARIABLE_VALID_RESPONSES, validResponses);
 
             Map<String, String> taskVariables = new HashMap<>();
             taskVariables.put(TASK_VARIABLE_TYPE, type);
@@ -174,9 +174,9 @@ public class ManualHandlingTasks {
             TaskService taskService = execution.getProcessEngineServices().getTaskService();
 
             taskService.setVariablesLocal(taskId, taskVariables);
-            logger.debug("successfully created fallout task: " + taskId);
+            logger.debug("successfully created fallout task: {}", taskId);
         } catch (BpmnError e) {
-            logger.debug(BPMN_EXCEPTION + e.getMessage());
+            logger.debug("{}{}", BPMN_EXCEPTION, e.getMessage());
             throw e;
         } catch (Exception ex) {
             String msg = "Exception in setFalloutTaskVariables " + ex.getMessage();
@@ -191,7 +191,7 @@ public class ManualHandlingTasks {
 
         try {
             String taskId = task.getId();
-            logger.debug("taskId is: " + taskId);
+            logger.debug("taskId is: {}", taskId);
             String type = TASK_TYPE_PAUSE;
 
             String nfRole = (String) execution.getVariable(VNF_TYPE);
@@ -224,9 +224,9 @@ public class ManualHandlingTasks {
             TaskService taskService = execution.getProcessEngineServices().getTaskService();
 
             taskService.setVariablesLocal(taskId, taskVariables);
-            logger.debug("successfully created pause task: " + taskId);
+            logger.debug("successfully created pause task: {}", taskId);
         } catch (BpmnError e) {
-            logger.debug(BPMN_EXCEPTION + e.getMessage());
+            logger.debug("{}{}", BPMN_EXCEPTION, e.getMessage());
             throw e;
         } catch (Exception ex) {
             String msg = "Exception in setPauseTaskVariables " + ex.getMessage();
@@ -243,21 +243,21 @@ public class ManualHandlingTasks {
         try {
 
             String taskId = task.getId();
-            logger.debug("taskId is: " + taskId);
+            logger.debug("taskId is: {}", taskId);
             TaskService taskService = execution.getProcessEngineServices().getTaskService();
 
             Map<String, Object> taskVariables = taskService.getVariables(taskId);
             String responseValue = (String) taskVariables.get(RESPONSE_VALUE);
 
-            logger.debug("Received responseValue on completion: " + responseValue);
+            logger.debug("Received responseValue on completion: {}", responseValue);
             // Have to set the first letter of the response to upper case
             String responseValueUppercaseStart =
                     responseValue.substring(0, 1).toUpperCase() + responseValue.substring(1);
-            logger.debug("ResponseValue to taskListener: " + responseValueUppercaseStart);
+            logger.debug("ResponseValue to taskListener: {}", responseValueUppercaseStart);
             execution.setVariable(RESPONSE_VALUE_TASK, responseValueUppercaseStart);
 
         } catch (BpmnError e) {
-            logger.debug(BPMN_EXCEPTION + e.getMessage());
+            logger.debug("{}{}", BPMN_EXCEPTION, e.getMessage());
             throw e;
         } catch (Exception ex) {
             String msg = "Exception in completeManualTask " + ex.getMessage();
index 109382c..c9f151f 100644 (file)
@@ -131,7 +131,7 @@ public class SDNCRequestTasks {
                 }
             }
         } catch (SDNCErrorResponseException e) {
-            logger.error("SDNC error response - " + e.getMessage());
+            logger.error("SDNC error response - {}", e.getMessage());
             exceptionBuilder.buildAndThrowWorkflowException(execution, 7000, e.getMessage(), ONAPComponents.SDNC);
         } catch (Exception e) {
             logger.error("Error processing SDNC callback", e);
index 6cb3461..9502240 100644 (file)
@@ -54,7 +54,7 @@ public class ServiceLevelPreparation extends ServiceLevel implements JavaDelegat
         if (execution.hasVariable(ServiceLevelConstants.RESOURCE_TYPE)
                 && execution.getVariable(ServiceLevelConstants.RESOURCE_TYPE) != null) {
             final String controllerScope = (String) execution.getVariable(ServiceLevelConstants.RESOURCE_TYPE);
-            LOG.debug("Scope retrieved from delegate execution: " + controllerScope);
+            LOG.debug("Scope retrieved from delegate execution: {}", controllerScope);
             if (ServiceLevelConstants.VALID_CONTROLLER_SCOPE.contains(controllerScope)) {
                 final String wflName =
                         fetchWorkflowUsingScope(controllerScope, ServiceLevelConstants.HEALTH_CHECK_OPERATION);
index bc2d40e..e2a43c3 100644 (file)
@@ -93,8 +93,8 @@ public class ServiceLevelRequestDispatcher implements JavaDelegate {
                     .filter(data -> data.getRelationshipKey().contains("pnf.pnf-name"))
                     .map(x -> x.getRelationshipValue()).collect(Collectors.toList());
             if (pnfNameList == null || pnfNameList.size() == 0) {
-                logger.warn(
-                        "Unable to find the PNF for service instance id: " + serviceInstance.getServiceInstanceId());
+                logger.warn("Unable to find the PNF for service instance id: {}",
+                        serviceInstance.getServiceInstanceId());
                 return;
             }
             delegateExecution.setVariable(ServiceLevelConstants.PNF_NAME_LIST, pnfNameList);
index a3a8f6e..44c9662 100644 (file)
@@ -50,7 +50,7 @@ public class ServiceLevelUpgrade extends ServiceLevel implements JavaDelegate {
         if (execution.hasVariable(ServiceLevelConstants.RESOURCE_TYPE)
                 && execution.getVariable(ServiceLevelConstants.RESOURCE_TYPE) != null) {
             final String controllerScope = (String) execution.getVariable(ServiceLevelConstants.RESOURCE_TYPE);
-            LOG.debug("Scope retrieved from delegate execution: " + controllerScope);
+            LOG.debug("Scope retrieved from delegate execution: {}", controllerScope);
             if (ServiceLevelConstants.VALID_CONTROLLER_SCOPE.contains(controllerScope)) {
                 final String wflName = fetchWorkflowUsingScope(controllerScope, ServiceLevelConstants.SW_UP_OPERATION);
                 LOG.debug("Software Upgrade workflow fetched for the scope: {} is: {}", controllerScope, wflName);
index d7f2b85..e732d5f 100755 (executable)
@@ -77,7 +77,7 @@ public class ExecuteBuildingBlockBuilder {
                     .append("flowName", orchFlow.getFlowName()).append("flowVersion", orchFlow.getFlowVersion())
                     .append("bpmnAction", orchFlow.getBpmnAction()).append("bpmnScope", orchFlow.getBpmnScope())
                     .toString();
-            logger.info("Flow: " + flowDetails);
+            logger.info("Flow: {}", flowDetails);
             buildExecuteBuildingBlockListPlan(orchFlow, plan, requestId, apiVersion, resourceId, requestAction, vnfType,
                     workflowResourceIds, requestDetails, replaceVnf);
         }
index 77cb616..5fa5534 100644 (file)
@@ -44,7 +44,7 @@ class ExecutionPlan extends ExecutionCollection<ExecutionGroup> {
 
     public void changeCurrentGroup(ExecutionGroup group) {
         if (currentGroup == null || !currentGroup.equals(group)) {
-            logger.info("Change " + getName() + " group[" + group.getName() + "]");
+            logger.info("Change {} group[{}]", getName(), group.getName());
             if (currentGroup != null)
                 currentGroup.flushBlocksFromCache(this.blocksBuiltCache);
         }
@@ -134,7 +134,7 @@ class ExecutionCollection<T extends ExecutionCollection<?>> {
         String blocks =
                 blocksCache.stream().map(x -> x.getBuildingBlock().getBpmnFlowName() + ", ").reduce("", String::concat);
         blocks = blocks.substring(0, blocks.length() - 2);
-        logger.info("Push " + getName() + " (" + blocksCache.size() + ") blocks [" + blocks + "]");
+        logger.info("Push {} ({}) blocks [{}]", getName(), blocksCache.size(), blocks);
         this.blocksBuiltCache.addAll(blocksCache);
     }
 
@@ -150,7 +150,7 @@ class ExecutionCollection<T extends ExecutionCollection<?>> {
             String blocks = this.blocksBuiltCache.stream().map(x -> x.getBuildingBlock().getBpmnFlowName() + ", ")
                     .reduce("", String::concat);
             blocks = blocks.substring(0, blocks.length() - 2);
-            logger.info("Flush " + getName() + " (" + blocksBuiltCache.size() + ") blocks [" + blocks + "]");
+            logger.info("Flush {} ({}) blocks [{}]", getName(), blocksBuiltCache.size(), blocks);
             blockList.addAll(this.blocksBuiltCache);
             this.blocksBuiltCache.clear();
         }
index 38fe6a3..a3a7f1c 100644 (file)
@@ -159,8 +159,8 @@ public class WorkflowActionBBFailure {
 
             if (Boolean.TRUE.equals(execution.getVariable(IS_CHILD_PROCESS))) {
                 String parentCorrelationId = (String) execution.getVariable(PARENT_CORRELATION_ID);
-                logger.info("Child service creation failed. Sending message to parent with correlationId: "
-                        parentCorrelationId);
+                logger.info("Child service creation failed. Sending message to parent with correlationId: {}",
+                        parentCorrelationId);
                 execution.getProcessEngineServices().getRuntimeService()
                         .createMessageCorrelation(CHILD_SVC_REQ_MESSAGE_NAME)
                         .setVariable(CHILD_SVC_REQ_STATUS, "FAILED").setVariable(CHILD_SVC_REQ_ERROR, childErrorMessage)
index fc38182..9bd2e35 100644 (file)
@@ -246,8 +246,8 @@ public class WorkflowActionBBTasks {
 
             if (Boolean.TRUE.equals(execution.getVariable(IS_CHILD_PROCESS))) {
                 String parentCorrelationId = (String) execution.getVariable(PARENT_CORRELATION_ID);
-                logger.info("Child service request completed. Sending message to parent process with correlationId: "
-                        parentCorrelationId);
+                logger.info("Child service request completed. Sending message to parent process with correlationId: {}",
+                        parentCorrelationId);
                 execution.getProcessEngineServices().getRuntimeService()
                         .createMessageCorrelation(CHILD_SVC_REQ_MESSAGE_NAME)
                         .setVariable(CHILD_SVC_REQ_STATUS, "COMPLETED").setVariable(CHILD_SVC_REQ_ERROR, "")
index 6df4f76..2f8235e 100644 (file)
@@ -87,7 +87,7 @@ public class SkipCDSBuildingBlockListener implements PreFlowManipulator {
             VnfResourceCustomization vrc = catalogDbClient
                     .getVnfResourceCustomizationByModelCustomizationUUID(resource.getModelCustomizationId());
             if (vrc != null) {
-                logger.debug("getSkipPostInstConf value: " + vrc.getSkipPostInstConf());
+                logger.debug("getSkipPostInstConf value: {}", vrc.getSkipPostInstConf());
                 boolean skipConfigVNF = vrc.getSkipPostInstConf();
                 currentSequenceSkipCheck(execution, skipConfigVNF);
             }
@@ -96,7 +96,7 @@ public class SkipCDSBuildingBlockListener implements PreFlowManipulator {
             VfModuleCustomization vfc = catalogDbClient
                     .getVfModuleCustomizationByModelCuztomizationUUID(resource.getModelCustomizationId());
             if (null != vfc) {
-                logger.debug("getSkipPostInstConf value: " + vfc.getSkipPostInstConf().booleanValue());
+                logger.debug("getSkipPostInstConf value: {}", vfc.getSkipPostInstConf().booleanValue());
                 boolean skipVfModule = vfc.getSkipPostInstConf();
                 currentSequenceSkipCheck(execution, skipVfModule);
             }
@@ -106,7 +106,7 @@ public class SkipCDSBuildingBlockListener implements PreFlowManipulator {
                     .getPnfResourceCustomizationByModelCustomizationUUID(resource.getModelCustomizationId());
 
             if (null != pnfResourceCustomization) {
-                logger.debug("getSkipPostInstConf value: " + pnfResourceCustomization.getSkipPostInstConf());
+                logger.debug("getSkipPostInstConf value: {}", pnfResourceCustomization.getSkipPostInstConf());
                 boolean skipConfigPNF = pnfResourceCustomization.getSkipPostInstConf();
                 currentSequenceSkipCheck(execution, skipConfigPNF);
             }
index e317822..ffcf1a5 100644 (file)
@@ -93,7 +93,7 @@ public class NetworkAdapterObjectMapper {
         String networkTechnology = l3Network.getModelInfoNetwork().getNetworkTechnology();
         if (networkTechnology == null) {
             networkTechnology = l3Network.getNetworkTechnology();
-            logger.warn("NetworkTechnology was null in CatalogDB. Using field from AAI: " + networkTechnology);
+            logger.warn("NetworkTechnology was null in CatalogDB. Using field from AAI: {}", networkTechnology);
         }
         if (networkTechnology != null) {
             createNetworkRequest.setNetworkTechnology(networkTechnology.toUpperCase());
index ae43971..644290b 100644 (file)
@@ -156,7 +156,7 @@ public class ControllerExecutionDETestIT extends BaseIntegrationTest {
 
     private void verifyRequestContentForAction(ExecutionServiceInput executionServiceInput) {
 
-        logger.info("Checking the " + this.action + " request");
+        logger.info("Checking the {} request", this.action);
         ActionIdentifiers actionIdentifiers = executionServiceInput.getActionIdentifiers();
 
         assertThat(actionIdentifiers.getBlueprintName()).isEqualTo(TEST_PNF_RESOURCE_BLUEPRINT_NAME);
index 4ed79c0..41a1f9e 100644 (file)
@@ -75,7 +75,7 @@ public class SDNCLcmPayloadBuilderTest {
         ActivateNESwPayload activateNESwPayload = SDNCLcmPayloadBuilder.buildActivateNESwPayload(execution);
         try {
             String payload = SDNCLcmPayloadBuilder.convertToSting(activateNESwPayload);
-            logger.debug("ActivateNESwPayload:\n" + payload);
+            logger.debug("ActivateNESwPayload:\n{}", payload);
 
             assertEquals(expectedPayload, payload);
         } catch (JsonProcessingException e) {
@@ -94,7 +94,7 @@ public class SDNCLcmPayloadBuilderTest {
         DownloadNESwPayload downloadNESwPayload = SDNCLcmPayloadBuilder.buildDownloadNESwPayload(execution);
         try {
             String payload = SDNCLcmPayloadBuilder.convertToSting(downloadNESwPayload);
-            logger.debug("DownloadNESwPayload:\n" + payload);
+            logger.debug("DownloadNESwPayload:\n{}", payload);
 
             assertEquals(expectedPayload, payload);
         } catch (JsonProcessingException e) {
@@ -111,7 +111,7 @@ public class SDNCLcmPayloadBuilderTest {
         UpgradePostCheckPayload upgradePostCheckPayload = SDNCLcmPayloadBuilder.buildUpgradePostCheckPayload(execution);
         try {
             String payload = SDNCLcmPayloadBuilder.convertToSting(upgradePostCheckPayload);
-            logger.debug("UpgradePostCheckPayload:\n" + payload);
+            logger.debug("UpgradePostCheckPayload:\n{}", payload);
 
             assertEquals(expectedPayload, payload);
         } catch (JsonProcessingException e) {
@@ -128,7 +128,7 @@ public class SDNCLcmPayloadBuilderTest {
         UpgradePreCheckPayload upgradePreCheckPayload = SDNCLcmPayloadBuilder.buildUpgradePreCheckPayload(execution);
         try {
             String payload = SDNCLcmPayloadBuilder.convertToSting(upgradePreCheckPayload);
-            logger.debug("UpgradePreCheckPayload:\n" + payload);
+            logger.debug("UpgradePreCheckPayload:\n{}", payload);
 
             assertEquals(expectedPayload, payload);
         } catch (JsonProcessingException e) {
index 8371c3b..7cd87f6 100644 (file)
@@ -81,7 +81,7 @@ public class HttpClient extends RestClient {
             if (isNotBlank(name) && isNotBlank(value)) {
                 headerMap.add("ALL", Pair.with(name, value));
             } else {
-                log.warn("Not adding " + name + " to headers.");
+                log.warn("Not adding {} to headers.", name);
             }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
index cbad59e..ff8d91a 100644 (file)
@@ -54,9 +54,9 @@ public abstract class DmaapConsumer extends DmaapClient {
                 stopwatch.stop();
                 for (String message : itr) {
                     if (this.isAccepted(message)) {
-                        logger.info("accepted message found for " + this.getRequestId() + " on " + this.getTopic());
+                        logger.info("accepted message found for {} on {}", this.getRequestId(), this.getTopic());
                     }
-                    logger.info("received dmaap message: " + message);
+                    logger.info("received dmaap message: {}", message);
                     if (this.isFailure(message)) {
                         this.stopProcessingMessages();
                         final String errorMsg = "failure received from dmaap topic " + this.getTopic();
index 158bc6e..46a0a06 100644 (file)
@@ -42,7 +42,7 @@ public abstract class DmaapPublisher extends DmaapClient {
     }
 
     public void send(String json) {
-        logger.info("publishing message to dmaap topic " + this.getTopic() + ": " + json);
+        logger.info("publishing message to dmaap topic {}: {}", this.getTopic(), json);
         publisher.send(json);
         // publisher.close(seconds, TimeUnit.SECONDS);
     }
index 69dd16a..80d4e2c 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -49,7 +49,7 @@ public class KafkaConsumerImpl extends KafkaClient {
 
 
     public List<String> get(String topic, String consumerGroup, String consumerId) {
-        logger.info("consuming message from kafka topic : " + topic);
+        logger.info("consuming message from kafka topic: {}", topic);
         this.properties.put("group.id", consumerGroup);
         this.properties.put("client.id", consumerId);
         if (consumer == null) {
@@ -62,13 +62,13 @@ public class KafkaConsumerImpl extends KafkaClient {
             msgs.add(rec.value());
         }
         logger.info("<<<<<<<<<<<<<<<<<<<<<<<<<<<<READING THE CONSUMED MESSAGES<<<<<<<<<<<<<<<<<<<<<<<<<<<");
-        msgs.forEach(msg -> logger.info("MESSAGE CONSUMED FROM KAFKA : <<<<<" + msg + ">>>>>"));
+        msgs.forEach(msg -> logger.info("MESSAGE CONSUMED FROM KAFKA : <<<<<{}>>>>>", msg));
         return msgs;
     }
 
     private void setProperties(String bootstrapServers) throws Exception {
         if (bootstrapServers == null) {
-            logger.error("Environment Variable " + kafkaBootstrapServers + " is missing");
+            logger.error("Environment Variable {} is missing", kafkaBootstrapServers);
             throw new Exception("Environment Variable " + kafkaBootstrapServers + " is missing");
         } else {
             this.properties.put("bootstrap.servers", bootstrapServers);
index f933465..e5136a0 100644 (file)
@@ -111,7 +111,7 @@ public class PolicyClientImpl implements PolicyClient {
         PolicyConfig[] policyConfigList = client.post(configReqParameters, PolicyConfig[].class);
         PolicyConfig policyConfig = null;
         if (policyConfigList.length > 1) {
-            logger.debug("Too many configs for policyName: " + policyName);
+            logger.debug("Too many configs for policyName: {}", policyName);
             return null;
         }
         try {
index 60ec58e..0953f6a 100644 (file)
@@ -150,7 +150,7 @@ public class AAITransactionalClient extends
                         }
                         AAIErrorFormatter formatter = new AAIErrorFormatter(error);
                         String outputMessage = formatter.getMessage();
-                        logger.error("part of a bulk action failed in A&AI: " + entry.getValue());
+                        logger.error("part of a bulk action failed in A&AI: {}", entry.getValue());
                         errorMessages.add(outputMessage);
                     }
                 }
index 31571ea..f755910 100644 (file)
@@ -168,8 +168,8 @@ public abstract class GraphInventoryResourcesClient<Self, Uri extends GraphInven
             giRC = client.createClient(clone.resourceVersion(resourceVersion));
             giRC.delete();
         } else {
-            logger.warn(clone.build() + " already does not exist in " + client.getGraphDBName()
-                    + " therefore delete call not executed");
+            logger.warn("{} already does not exist in {} therefore delete call not executed", clone.build(),
+                    client.getGraphDBName());
         }
     }
 
index 4e0ba08..0459d74 100644 (file)
@@ -217,7 +217,7 @@ public class CamundaRequestHandler {
             httpHeaders.set(httpHeaders.ACCEPT, headers.get(httpHeaders.ACCEPT).get(0));
             httpHeaders.set(httpHeaders.CONTENT_TYPE, headers.get(httpHeaders.CONTENT_TYPE).get(0));
         }).body(BodyInserters.fromObject(msgJson.toString())).retrieve().bodyToFlux(String.class);
-        flux.subscribe(res -> logger.debug("Send Camunda Message: " + res));
+        flux.subscribe(res -> logger.debug("Send Camunda Message: {}", res));
     }
 
     protected RestTemplate getRestTemplate(boolean retry) {
index 1f8768a..441cdf0 100644 (file)
@@ -281,7 +281,7 @@ public class E2EServiceInstances {
                     ErrorNumbers.SVC_BAD_PARAMETER, null, version);
             logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_REQUEST_VALIDATION_ERROR.toString(),
                     MSO_PROP_APIHANDLER_INFRA, ErrorCode.SchemaError.getValue(), requestJSON, e);
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity().toString());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity().toString());
 
             return response;
         }
@@ -313,7 +313,7 @@ public class E2EServiceInstances {
                     ErrorNumbers.SVC_NO_SERVER_RESOURCES, null, version);
             logger.error("", MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "",
                     ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine", e);
-            logger.debug(END_OF_THE_TRANSACTION + resp.getEntity().toString());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, resp.getEntity().toString());
             return resp;
         }
         return postRequest(workflowUrl, postParam, version);
@@ -336,7 +336,7 @@ public class E2EServiceInstances {
             Response response =
                     msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND, MsoException.ServiceException,
                             e.getMessage(), ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB, null, version);
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
             return response;
 
         }
@@ -348,7 +348,7 @@ public class E2EServiceInstances {
             logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_BPEL_COMMUNICATE_ERROR.toString(),
                     MSO_PROP_APIHANDLER_INFRA, ErrorCode.BusinessProcessError.getValue(),
                     "Null response from RequestDB when searching by serviceId");
-            logger.debug(END_OF_THE_TRANSACTION + resp.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, resp.getEntity());
             return resp;
 
         }
@@ -374,7 +374,7 @@ public class E2EServiceInstances {
                     ErrorNumbers.SVC_BAD_PARAMETER, null, version);
             logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_REQUEST_VALIDATION_ERROR.toString(),
                     MSO_PROP_APIHANDLER_INFRA, ErrorCode.SchemaError.getValue(), requestJSON, e);
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
             return response;
         }
 
@@ -403,7 +403,7 @@ public class E2EServiceInstances {
             msoRequest.createErrorRequestRecord(Status.FAILED, requestId,
                     "Exception while communciate with " + "Catalog DB", action, ModelType.service.name(), requestJSON,
                     null, null);
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
             return response;
         }
         if (recipeLookupResult == null) {
@@ -415,7 +415,7 @@ public class E2EServiceInstances {
 
             msoRequest.createErrorRequestRecord(Status.FAILED, requestId, "Recipe does not exist in catalog DB", action,
                     ModelType.service.name(), requestJSON, null, null);
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
             return response;
         }
 
@@ -441,7 +441,7 @@ public class E2EServiceInstances {
             logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_BPEL_COMMUNICATE_ERROR.toString(),
                     MSO_PROP_APIHANDLER_INFRA, ErrorCode.AvailabilityError.getValue(),
                     "Exception while communicate with BPMN engine");
-            logger.debug("End of the transaction, the final response is: " + resp.getEntity());
+            logger.debug("End of the transaction, the final response is: {}", resp.getEntity());
             return resp;
         }
         return postRequest(recipeLookupResult.getOrchestrationURI(), postParam, version);
@@ -463,7 +463,7 @@ public class E2EServiceInstances {
                     ErrorNumbers.SVC_BAD_PARAMETER, null, version);
             logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_REQUEST_VALIDATION_ERROR.toString(),
                     MSO_PROP_APIHANDLER_INFRA, ErrorCode.SchemaError.getValue(), requestJSON, e);
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
             return response;
         }
 
@@ -492,7 +492,7 @@ public class E2EServiceInstances {
             msoRequest.createErrorRequestRecord(Status.FAILED, requestId,
                     "Exception while communciate with " + "Catalog DB", action, ModelType.service.name(), requestJSON,
                     null, null);
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
             return response;
         }
         if (recipeLookupResult == null) {
@@ -504,7 +504,7 @@ public class E2EServiceInstances {
 
             msoRequest.createErrorRequestRecord(Status.FAILED, requestId, "Recipe does not exist in catalog DB", action,
                     ModelType.service.name(), requestJSON, null, null);
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
             return response;
         }
         String bpmnRequest = null;
@@ -527,7 +527,7 @@ public class E2EServiceInstances {
             logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_BPEL_COMMUNICATE_ERROR.toString(),
                     MSO_PROP_APIHANDLER_INFRA, ErrorCode.AvailabilityError.getValue(),
                     "Exception while communicate with BPMN engine");
-            logger.debug("End of the transaction, the final response is: " + resp.getEntity());
+            logger.debug("End of the transaction, the final response is: {}", resp.getEntity());
             return resp;
         }
 
@@ -551,7 +551,7 @@ public class E2EServiceInstances {
                     ErrorNumbers.SVC_BAD_PARAMETER, null, version);
             logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_REQUEST_VALIDATION_ERROR.toString(),
                     MSO_PROP_APIHANDLER_INFRA, ErrorCode.SchemaError.getValue(), requestJSON, e);
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
             return response;
         }
 
@@ -569,7 +569,7 @@ public class E2EServiceInstances {
             }
             logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_REQUEST_VALIDATION_ERROR.toString(),
                     MSO_PROP_APIHANDLER_INFRA, ErrorCode.SchemaError.getValue(), requestJSON, e);
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
             return response;
         }
 
@@ -583,7 +583,7 @@ public class E2EServiceInstances {
                     MsoException.ServiceException, "No communication to catalog DB " + e.getMessage(),
                     ErrorNumbers.SVC_NO_SERVER_RESOURCES, null, version);
 
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
 
             return response;
         }
@@ -594,7 +594,7 @@ public class E2EServiceInstances {
             Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND,
                     MsoException.ServiceException, "Recipe does not exist in catalog DB",
                     ErrorNumbers.SVC_GENERAL_SERVICE_ERROR, null, version);
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
 
             return response;
         }
@@ -629,7 +629,7 @@ public class E2EServiceInstances {
                     ErrorNumbers.SVC_BAD_PARAMETER, null, version);
             logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_REQUEST_VALIDATION_ERROR.toString(),
                     MSO_PROP_APIHANDLER_INFRA, ErrorCode.SchemaError.getValue(), requestJSON, e);
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
             return response;
         }
 
@@ -647,7 +647,7 @@ public class E2EServiceInstances {
             }
             logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_REQUEST_VALIDATION_ERROR.toString(),
                     MSO_PROP_APIHANDLER_INFRA, ErrorCode.SchemaError.getValue(), requestJSON, e);
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
             return response;
         }
 
@@ -660,7 +660,7 @@ public class E2EServiceInstances {
             Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND,
                     MsoException.ServiceException, "No communication to catalog DB " + e.getMessage(),
                     ErrorNumbers.SVC_NO_SERVER_RESOURCES, null, version);
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
             return response;
         }
 
@@ -670,7 +670,7 @@ public class E2EServiceInstances {
             Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND,
                     MsoException.ServiceException, "Recipe does not exist in catalog DB",
                     ErrorNumbers.SVC_GENERAL_SERVICE_ERROR, null, version);
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
             return response;
         }
 
@@ -703,7 +703,7 @@ public class E2EServiceInstances {
                     ErrorNumbers.SVC_BAD_PARAMETER, null, version);
             logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_REQUEST_VALIDATION_ERROR.toString(),
                     MSO_PROP_APIHANDLER_INFRA, ErrorCode.SchemaError.getValue(), requestJSON, e);
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
             return response;
         }
 
@@ -722,7 +722,7 @@ public class E2EServiceInstances {
             msoRequest.createErrorRequestRecord(Status.FAILED, requestId,
                     "No communication to catalog DB " + e.getMessage(), action, ModelType.service.name(), requestJSON,
                     null, null);
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
             return response;
         }
         if (recipeLookupResult == null) {
@@ -734,7 +734,7 @@ public class E2EServiceInstances {
                     ErrorNumbers.SVC_GENERAL_SERVICE_ERROR, null, version);
             msoRequest.createErrorRequestRecord(Status.FAILED, requestId, "No recipe found in DB", action,
                     ModelType.service.name(), requestJSON, null, null);
-            logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
             return response;
         }
         String bpmnRequest = null;
@@ -758,7 +758,7 @@ public class E2EServiceInstances {
             logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_BPEL_COMMUNICATE_ERROR.toString(),
                     MSO_PROP_APIHANDLER_INFRA, ErrorCode.AvailabilityError.getValue(),
                     "Exception while creating bpmnRequest", e);
-            logger.debug(END_OF_THE_TRANSACTION + resp.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, resp.getEntity());
             return resp;
         }
         return postRequest(recipeLookupResult.getOrchestrationURI(), postParam, version);
@@ -776,7 +776,7 @@ public class E2EServiceInstances {
             logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_BPEL_COMMUNICATE_ERROR.toString(),
                     MSO_PROP_APIHANDLER_INFRA, ErrorCode.AvailabilityError.getValue(),
                     "Exception while communicate with BPMN engine");
-            logger.debug(END_OF_THE_TRANSACTION + resp.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, resp.getEntity());
             return resp;
         } catch (Exception e) {
             Response resp = msoRequest.buildServiceErrorResponse(HttpStatus.SC_BAD_GATEWAY,
@@ -785,7 +785,7 @@ public class E2EServiceInstances {
             logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_BPEL_COMMUNICATE_ERROR.toString(),
                     MSO_PROP_APIHANDLER_INFRA, ErrorCode.AvailabilityError.getValue(),
                     "Exception while communicate with BPMN engine");
-            logger.debug(END_OF_THE_TRANSACTION + resp.getEntity());
+            logger.debug("{}{}", END_OF_THE_TRANSACTION, resp.getEntity());
             return resp;
         }
         return bpelStatusUpdate(response, version);
@@ -796,7 +796,7 @@ public class E2EServiceInstances {
         responseHandler.acceptedResponse(responseEntity);
         CamundaResponse camundaResponse = responseHandler.getCamundaResponse(responseEntity);
         String response = camundaResponse.getResponse();
-        logger.debug(END_OF_THE_TRANSACTION + response);
+        logger.debug("{}{}", END_OF_THE_TRANSACTION, response);
         return builder.buildResponse(HttpStatus.SC_ACCEPTED, null, response, apiVersion);
     }
 
@@ -812,8 +812,8 @@ public class E2EServiceInstances {
         RecipeLookupResult recipeLookupResult = getServiceURI(serviceModelUUID, action);
 
         if (recipeLookupResult != null) {
-            logger.debug("Orchestration URI is: " + recipeLookupResult.getOrchestrationURI() + ", recipe Timeout is: "
-                    Integer.toString(recipeLookupResult.getRecipeTimeout()));
+            logger.debug("Orchestration URI is: {}, recipe Timeout is: {}", recipeLookupResult.getOrchestrationURI(),
+                    Integer.toString(recipeLookupResult.getRecipeTimeout()));
         } else {
             logger.debug("No matching recipe record found");
         }
index 8a33f89..c5b825d 100644 (file)
@@ -237,7 +237,7 @@ public class ManagedObject3gppServiceInstances {
             try {
                 response = mapper.writeValueAsString(mOIResponse);
             } catch (Exception exception) {
-                LOGGER.error("Error while creating MOIResponse JSON" + exception.getMessage());
+                LOGGER.error("Error while creating MOIResponse JSON{}", exception.getMessage());
             }
 
             return builder.buildResponse(HttpStatus.SC_OK, null, response, version);
@@ -348,7 +348,7 @@ public class ManagedObject3gppServiceInstances {
                 Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND,
                         MsoException.ServiceException, "No communication to catalog DB " + e.getMessage(),
                         ErrorNumbers.SVC_NO_SERVER_RESOURCES, null, version);
-                LOGGER.debug(END_OF_THE_TRANSACTION + response.getEntity());
+                LOGGER.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
                 return response;
             }
 
@@ -358,7 +358,7 @@ public class ManagedObject3gppServiceInstances {
                 Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND,
                         MsoException.ServiceException, "Recipe does not exist in catalog DB",
                         ErrorNumbers.SVC_GENERAL_SERVICE_ERROR, null, version);
-                LOGGER.debug(END_OF_THE_TRANSACTION + response.getEntity());
+                LOGGER.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
                 return response;
             }
 
@@ -486,8 +486,8 @@ public class ManagedObject3gppServiceInstances {
         RecipeLookupResult recipeLookupResult = getServiceURI(serviceModelUUID, action, defaultServiceModelName);
 
         if (recipeLookupResult != null) {
-            LOGGER.debug("Orchestration URI is: " + recipeLookupResult.getOrchestrationURI() + ", recipe Timeout is: "
-                    Integer.toString(recipeLookupResult.getRecipeTimeout()));
+            LOGGER.debug("Orchestration URI is: {}, recipe Timeout is: {}", recipeLookupResult.getOrchestrationURI(),
+                    Integer.toString(recipeLookupResult.getRecipeTimeout()));
         } else {
             LOGGER.debug("No matching recipe record found");
         }
@@ -540,7 +540,7 @@ public class ManagedObject3gppServiceInstances {
             String orchestrationURI, String requestScope) throws ApiException {
         ResponseEntity<String> response =
                 requestHandlerUtils.postRequest(currentActiveReq, parameter, orchestrationURI);
-        LOGGER.debug("BPEL response : " + response);
+        LOGGER.debug("BPEL response : {}", response);
         int bpelStatus = responseHandler.setStatus(response.getStatusCodeValue());
         String jsonResponse;
         try {
index 00b099b..587361d 100644 (file)
@@ -294,7 +294,7 @@ public class Onap3gppServiceInstances {
                 Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND,
                         MsoException.ServiceException, "No communication to catalog DB " + e.getMessage(),
                         ErrorNumbers.SVC_NO_SERVER_RESOURCES, null, version);
-                logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+                logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
                 return response;
             }
 
@@ -304,7 +304,7 @@ public class Onap3gppServiceInstances {
                 Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND,
                         MsoException.ServiceException, "Recipe does not exist in catalog DB",
                         ErrorNumbers.SVC_GENERAL_SERVICE_ERROR, null, version);
-                logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+                logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
                 return response;
             }
 
@@ -376,7 +376,7 @@ public class Onap3gppServiceInstances {
                 Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND,
                         MsoException.ServiceException, "No communication to catalog DB " + e.getMessage(),
                         ErrorNumbers.SVC_NO_SERVER_RESOURCES, null, version);
-                logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+                logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
                 return response;
             }
 
@@ -386,7 +386,7 @@ public class Onap3gppServiceInstances {
                 Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND,
                         MsoException.ServiceException, "Recipe does not exist in catalog DB",
                         ErrorNumbers.SVC_GENERAL_SERVICE_ERROR, null, version);
-                logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+                logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
                 return response;
             }
 
@@ -457,7 +457,7 @@ public class Onap3gppServiceInstances {
                 Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND,
                         MsoException.ServiceException, "No communication to catalog DB " + e.getMessage(),
                         ErrorNumbers.SVC_NO_SERVER_RESOURCES, null, version);
-                logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+                logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
                 return response;
             }
 
@@ -467,7 +467,7 @@ public class Onap3gppServiceInstances {
                 Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND,
                         MsoException.ServiceException, "Recipe does not exist in catalog DB",
                         ErrorNumbers.SVC_GENERAL_SERVICE_ERROR, null, version);
-                logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+                logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
                 return response;
             }
 
@@ -544,7 +544,7 @@ public class Onap3gppServiceInstances {
                 Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND,
                         MsoException.ServiceException, "No communication to catalog DB " + e.getMessage(),
                         ErrorNumbers.SVC_NO_SERVER_RESOURCES, null, version);
-                logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+                logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
                 return response;
             }
 
@@ -554,7 +554,7 @@ public class Onap3gppServiceInstances {
                 Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND,
                         MsoException.ServiceException, "Recipe does not exist in catalog DB",
                         ErrorNumbers.SVC_GENERAL_SERVICE_ERROR, null, version);
-                logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+                logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
                 return response;
             }
 
@@ -633,8 +633,8 @@ public class Onap3gppServiceInstances {
         RecipeLookupResult recipeLookupResult = getServiceURI(serviceModelUUID, action, defaultServiceModelName);
 
         if (recipeLookupResult != null) {
-            logger.debug("Orchestration URI is: " + recipeLookupResult.getOrchestrationURI() + ", recipe Timeout is: "
-                    Integer.toString(recipeLookupResult.getRecipeTimeout()));
+            logger.debug("Orchestration URI is: {}, recipe Timeout is: {}", recipeLookupResult.getOrchestrationURI(),
+                    Integer.toString(recipeLookupResult.getRecipeTimeout()));
         } else {
             logger.debug("No matching recipe record found");
         }
@@ -741,7 +741,7 @@ public class Onap3gppServiceInstances {
             String orchestrationURI, String requestScope) throws ApiException {
         ResponseEntity<String> response =
                 requestHandlerUtils.postRequest(currentActiveReq, parameter, orchestrationURI);
-        logger.debug("BPEL response : " + response);
+        logger.debug("BPEL response : {}", response);
         int bpelStatus = responseHandler.setStatus(response.getStatusCodeValue());
         String jsonResponse;
         try {
index 6132815..ad3e8d6 100644 (file)
@@ -109,7 +109,7 @@ public class ResumeOrchestrationRequest {
         try {
             infraActiveRequest = requestsDbClient.getInfraActiveRequestbyRequestId(requestId);
         } catch (HttpClientErrorException e) {
-            logger.error("Error occurred while performing requestDb lookup by requestId: " + requestId, e);
+            logger.error("Error occurred while performing requestDb lookup by requestId: {}", requestId, e);
             ErrorLoggerInfo errorLoggerInfo =
                     new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ACCESS_EXC, ErrorCode.AvailabilityError).build();
             throw new ValidateException.Builder("Exception while performing requestDb lookup by requestId",
index b2bb1e0..08f9d80 100644 (file)
@@ -256,7 +256,7 @@ public class ServiceIntentApiHandler {
                 Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND,
                         MsoException.ServiceException, "No " + "communication to catalog DB " + e.getMessage(),
                         ErrorNumbers.SVC_NO_SERVER_RESOURCES, null, version);
-                logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+                logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
                 return response;
             }
 
@@ -266,7 +266,7 @@ public class ServiceIntentApiHandler {
                 Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND,
                         MsoException.ServiceException, "Recipe does " + "not exist in catalog DB",
                         ErrorNumbers.SVC_GENERAL_SERVICE_ERROR, null, version);
-                logger.debug(END_OF_THE_TRANSACTION + response.getEntity());
+                logger.debug("{}{}", END_OF_THE_TRANSACTION, response.getEntity());
                 return response;
             }
 
@@ -310,8 +310,8 @@ public class ServiceIntentApiHandler {
         RecipeLookupResult recipeLookupResult = getServiceURI(serviceModelUUID, action, defaultServiceModelName);
 
         if (recipeLookupResult != null) {
-            logger.debug("Orchestration URI is: " + recipeLookupResult.getOrchestrationURI() + ", recipe Timeout is: "
-                    Integer.toString(recipeLookupResult.getRecipeTimeout()));
+            logger.debug("Orchestration URI is: {}, recipe Timeout is: {}", recipeLookupResult.getOrchestrationURI(),
+                    Integer.toString(recipeLookupResult.getRecipeTimeout()));
         } else {
             logger.debug("No matching recipe record found");
         }
@@ -404,7 +404,7 @@ public class ServiceIntentApiHandler {
             String orchestrationURI, String requestScope) throws ApiException {
         ResponseEntity<String> response =
                 requestHandlerUtils.postRequest(currentActiveReq, parameter, orchestrationURI);
-        logger.debug("BPEL response : " + response);
+        logger.debug("BPEL response : {}", response);
         int bpelStatus = responseHandler.setStatus(response.getStatusCodeValue());
         String jsonResponse;
         try {
index 0c58a6f..609f221 100644 (file)
@@ -94,7 +94,7 @@ public class WorkflowSpecificationsHandler {
             // 1. query workflow specifications for given vnfModelVersionId if need.
             if (vnfModelVersionId != null) {
                 List<Workflow> vnfWorkflows = queryWorkflowSpecificationsForVnf(vnfModelVersionId);
-                logger.debug("Retrieved " + vnfWorkflows.size() + " workflows for given vnfModelVersionId.");
+                logger.debug("Retrieved {} workflows for given vnfModelVersionId.", vnfWorkflows.size());
                 if (vnfWorkflows.size() > 0) {
                     workflows.addAll(vnfWorkflows);
                 }
@@ -103,7 +103,7 @@ public class WorkflowSpecificationsHandler {
             // 2. query workflow specifications for given pnfModelVersionId if need.
             if (pnfModelVersionId != null) {
                 List<Workflow> pnfWorkflows = queryWorkflowSpecificationsForPnf(pnfModelVersionId);
-                logger.debug("Retrieved " + pnfWorkflows.size() + " workflows for given pnfModelVerionId.");
+                logger.debug("Retrieved {} workflows for given pnfModelVerionId.", pnfWorkflows.size());
                 if (pnfWorkflows.size() > 0) {
                     workflows.addAll(pnfWorkflows);
                 }
@@ -112,8 +112,7 @@ public class WorkflowSpecificationsHandler {
             // 3. query workflow specifications for given resourceTarget
             if (resourceTarget != null) {
                 List<Workflow> workflowsForResourceTarget = queryWorkflowsForResourceTarget(resourceTarget);
-                logger.debug(
-                        "Retrieved " + workflowsForResourceTarget.size() + " workflows for given resource target.");
+                logger.debug("Retrieved {} workflows for given resource target.", workflowsForResourceTarget.size());
                 if (workflowsForResourceTarget.size() > 0) {
                     workflows.addAll(workflowsForResourceTarget);
                 }
@@ -222,7 +221,7 @@ public class WorkflowSpecificationsHandler {
                 if (activitySpec != null) {
                     ActivitySequence activitySequence = new ActivitySequence();
                     activitySequence.setName(activitySpec.getName());
-                    logger.debug("Adding activity: " + activitySpec.getName());
+                    logger.debug("Adding activity: {}", activitySpec.getName());
                     activitySequence.setDescription(activitySpec.getDescription());
                     activitySequences.add(activitySequence);
                 }
index c527b9e..059d4f9 100644 (file)
@@ -94,8 +94,8 @@ public class CreateVnfOperationalEnvironment {
             int ctr = 0;
             int total = serviceEndpointRequestList.size();
             for (ServiceEndPointRequest requestList : serviceEndpointRequestList) {
-                logger.debug("Creating endpoint " + ++ctr + " of " + total + ": "
-                        requestList.getServiceEndPoint().getName());
+                logger.debug("Creating endpoint {} of {}: {}", ++ctr, total,
+                        requestList.getServiceEndPoint().getName());
                 getGrmClient().addServiceEndPoint(requestList);
             }
 
index 71ecc5c..9f7b620 100644 (file)
@@ -61,8 +61,8 @@ public class OofClient {
     public void postDemands(OofRequest homingRequest) throws BadResponseException, JsonProcessingException {
         logger.trace("Started oof Client Post Demands");
         String url = oofProperties.getHost() + oofProperties.getUri();
-        logger.debug("Post demands url: " + url);
-        logger.debug("Post demands payload: " + homingRequest.toJsonString());
+        logger.debug("Post demands url: {}", url);
+        logger.debug("Post demands payload: {}", homingRequest.toJsonString());
 
         HttpHeaders header = new HttpHeaders();
         header.setContentType(MediaType.APPLICATION_JSON);