aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/ConfigurationUtils.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/ConfigurationUtils.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/ConfigurationUtils.java
index 991ec5fc8b..6adeb2db10 100644
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/ConfigurationUtils.java
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/ConfigurationUtils.java
@@ -205,7 +205,7 @@ public class ConfigurationUtils {
try {
return Enum.valueOf(ConfigurationMode.class, modeName);
} catch (Exception exception) {
- //do nothing
+ LOGGER.debug("Configuration mode for merge strategy '{}' not found", modeName, exception);
}
}
}
@@ -231,7 +231,7 @@ public class ConfigurationUtils {
throw new ConfigurationException(CONFIGURATION_TYPE_NOT_SUPPORTED + configType);
}
} catch (ConfigurationException exception) {
- exception.printStackTrace();
+ LOGGER.error("Error reading configuration at {}.", url.toString(), exception);
}
return Optional.empty();
@@ -263,7 +263,7 @@ public class ConfigurationUtils {
try {
configurationMode = ConfigurationMode.valueOf(configMode);
} catch (Exception exception) {
- LOGGER.error("Could not find convert {} into configuration mode", configMode);
+ LOGGER.error("Could not find convert {} into configuration mode.", configMode, exception);
}
return Optional.ofNullable(configurationMode);
}
@@ -457,7 +457,7 @@ public class ConfigurationUtils {
return IOUtils.toString(new URL(path), Charset.defaultCharset());
}
} catch (Exception exception) {
- exception.printStackTrace();
+ LOGGER.error("Error while getting '{}' content", path, exception);
}
return null;
}
@@ -468,7 +468,7 @@ public class ConfigurationUtils {
return new String(Files.readAllBytes(path));
}
} catch (Exception exception) {
- exception.printStackTrace();
+ LOGGER.error("Error while getting '{}' content", path.toString(), exception);
}
return null;
}