public static Properties loadProperties(String propertyFileName) {
Properties props = new Properties();
- InputStream inputStream = NbiNotificationsUtils.class.getClassLoader()
- .getResourceAsStream(propertyFileName);
+ InputStream inputStream = NbiNotificationsUtils.class.getClassLoader().getResourceAsStream(propertyFileName);
try {
if (inputStream != null) {
props.load(inputStream);
LOG.warn("Kafka property file '{}' is empty", propertyFileName);
}
} catch (IOException e) {
- LOG.warn("Kafka property file '{}' was not found in the classpath", propertyFileName);
+ LOG.error("Kafka property file '{}' was not found in the classpath", propertyFileName, e);
}
return props;
}