import org.openecomp.sdc.be.config.DistributionEngineConfiguration.DistributionNotificationTopicConfig;
import org.openecomp.sdc.be.config.DistributionEngineConfiguration.DistributionStatusTopicConfig;
import org.openecomp.sdc.be.config.validation.DeploymentArtifactHeatConfiguration;
+import org.openecomp.sdc.common.log.enums.EcompLoggerErrorCode;
import org.openecomp.sdc.common.log.wrappers.Logger;
import org.openecomp.sdc.fe.config.Configuration.FeMonitoringConfig;
import org.yaml.snakeyaml.TypeDescription;
config = convert(fullFileName, className);
} catch (Exception e) {
- log.error("Failed to convert yaml file {} to object.", configFileName,e);
+ log.error(EcompLoggerErrorCode.UNKNOWN_ERROR,"","","Failed to convert yaml file {} to object.", configFileName,e);
}
return config;
File f = new File(fullFileName);
if (!f.exists()) {
- log.warn("The file " + fullFileName + " cannot be found. Ignore reading configuration.");
+ log.warn(EcompLoggerErrorCode.UNKNOWN_ERROR,"","","The file {} cannot be found. Ignore reading configuration.",fullFileName);
return null;
}
in = Files.newInputStream(Paths.get(fullFileName));
// System.out.println(config.toString());
} catch (Exception e) {
- log.error("Failed to convert yaml file {} to object.", fullFileName, e);
+ log.error(EcompLoggerErrorCode.UNKNOWN_ERROR,"","","Failed to convert yaml file {} to object.", fullFileName, e);
} finally {
if (in != null) {
try {
config = yaml.loadAs(in, className);
} catch (Exception e) {
- log.error("Failed to convert yaml file to object", e);
+ log.error(EcompLoggerErrorCode.UNKNOWN_ERROR,"","","Failed to convert yaml file to object", e);
} finally {
if (in != null) {
try {
return isValidYaml(decodedFileContents);
}
-
+ @SuppressWarnings("unchecked")
public boolean isValidYaml(byte[] fileContents) {
try {
}
} catch (Exception e) {
- log.error("Failed to convert yaml file to object - yaml is invalid", e);
+ log.error(EcompLoggerErrorCode.UNKNOWN_ERROR,"","","Failed to convert yaml file to object - yaml is invalid", e);
return false;
}
return true;