davsclaus commented on code in PR #15063:
URL: https://github.com/apache/camel/pull/15063#discussion_r1713876642


##########
core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java:
##########
@@ -433,6 +448,44 @@ private Properties tryLoadProperties(
         return ip;
     }
 
+    private static Properties tryLoadCloudProperties(
+            Properties overridProperties, String cloudPropertiesLocations)
+            throws IOException {
+        final OrderedLocationProperties cp = new OrderedLocationProperties();
+        try {
+            String[] locations = cloudPropertiesLocations.split(",");
+            for (String loc : locations) {
+                Path confPath = Paths.get(loc);
+                if (Files.exists(confPath) && Files.isDirectory(confPath)) {
+                    Files.walkFileTree(confPath, new SimpleFileVisitor<Path>() 
{
+                        @Override
+                        public FileVisitResult visitFile(Path file, 
BasicFileAttributes attrs) {
+                            if (!Files.isDirectory(file)) {
+                                try {
+                                    String val = new 
String(Files.readAllBytes(file));
+                                    cp.put(loc, file.getFileName().toString(), 
val);
+                                } catch (IOException e) {
+                                    LOG.warn("Some error happened while 
reading property from cloud configuration file {}",
+                                            file, e);
+                                    e.printStackTrace();

Review Comment:
   Remove this the stacktrace is already logged in the WARN



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to