summaryrefslogtreecommitdiffstats
path: root/catalog-be/src
diff options
context:
space:
mode:
authorYuli Shlosberg <ys9693@att.com>2018-10-18 14:59:56 +0300
committerMichael Lando <michael.lando@intl.att.com>2018-10-22 13:37:38 +0000
commit5895be67ab61d7b97247b23482558c2bd95d02d7 (patch)
tree75d301a70f0b55fa211a0c71a79dc469dc9e7920 /catalog-be/src
parent3cccf9ae82e7c531c15e4d53f646fd58f0335fd3 (diff)
failed to import a tosca vsp
proper prints have added to log Change-Id: I73e0441036dbc7206f148cf8fe8a21f6266397ce Issue-ID: SDC-1683 Signed-off-by: Yuli Shlosberg <ys9693@att.com>
Diffstat (limited to 'catalog-be/src')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java8
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/exceptions/ComponentException.java18
2 files changed, 22 insertions, 4 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java
index ebdbcea535..03ffdd5fa6 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java
@@ -78,12 +78,12 @@ import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum;
import org.openecomp.sdc.common.api.ArtifactTypeEnum;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.datastructure.Wrapper;
+import org.openecomp.sdc.common.log.wrappers.Logger;
import org.openecomp.sdc.common.util.GeneralUtility;
import org.openecomp.sdc.common.util.ValidationUtils;
import org.openecomp.sdc.common.util.YamlToObjectConverter;
import org.openecomp.sdc.exception.ResponseFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.xml.sax.*;
import org.yaml.snakeyaml.Yaml;
@@ -119,7 +119,7 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic {
public static final String HEAT_ENV_SUFFIX = "env";
private static final String ARTIFACT_PLACEHOLDER_FILE_EXTENSION = "fileExtension";
- private static final Logger log = LoggerFactory.getLogger(ArtifactsBusinessLogic.class);
+ private static final Logger log = Logger.getLogger(ArtifactsBusinessLogic.class);
public static final String FAILED_UPDATE_GROUPS = "Failed to update groups of the component {}. ";
public static final String FAILED_UPDATE_ARTIFACT = "Failed to delete or update the artifact {}. Parent uniqueId is {}";
public static final String FAILED_SAVE_ARTIFACT = "Failed to save the artifact.";
@@ -3258,7 +3258,7 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic {
// currently done separately
else {
if (!isArtifactMetadataUpdate) {
- log.debug("Payload is missing.");
+ log.debug("In artifact: {} Payload is missing.",artifactInfo.getArtifactName());
ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.MISSING_DATA, ARTIFACT_PAYLOAD);
return Either.right(responseFormat);
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/exceptions/ComponentException.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/exceptions/ComponentException.java
index 69ac1b892a..72d54873d2 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/exceptions/ComponentException.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/exceptions/ComponentException.java
@@ -3,6 +3,8 @@ package org.openecomp.sdc.be.components.impl.exceptions;
import org.openecomp.sdc.be.dao.api.ActionStatus;
import org.openecomp.sdc.exception.ResponseFormat;
+import java.util.Arrays;
+
public class ComponentException extends RuntimeException {
/**
@@ -39,5 +41,21 @@ public class ComponentException extends RuntimeException {
return params.clone();
}
+ @Override
+ public String getMessage() {
+ return this.toString();
+ }
+
+ @Override
+ public String toString() {
+ return "ComponentException{" +
+ "responseFormat=" + responseFormat +
+ ", actionStatus=" + actionStatus +
+ ", params=" + Arrays.toString(params) +
+ '}';
+ }
+
+
+
}