This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 30aecde1565 CAMEL-20460: Improve platform http log (#13285)
30aecde1565 is described below

commit 30aecde15652237cd94427ca2a1b39584e985590
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Sun Feb 25 09:12:48 2024 +0100

    CAMEL-20460: Improve platform http log (#13285)
---
 .../component/platform/http/main/MainHttpServer.java  | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git 
a/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServer.java
 
b/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServer.java
index 0a5f600d285..6263068c794 100644
--- 
a/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServer.java
+++ 
b/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServer.java
@@ -330,13 +330,20 @@ public class MainHttpServer extends ServiceSupport 
implements CamelContextAware,
                     for (HttpEndpointModel u : endpoints) {
                         String line = "http://0.0.0.0:"; + (server != null ? 
server.getPort() : getPort()) + u.getUri();
                         if (u.getVerbs() != null) {
-                            line += " (" + u.getVerbs() + ")";
+                            line += "    (" + u.getVerbs() + ")";
                         }
-                        if (u.getConsumes() != null) {
-                            line += " accept: " + u.getConsumes();
-                        }
-                        if (u.getProduces() != null) {
-                            line += " produce: " + u.getProduces();
+                        if (u.getConsumes() != null || u.getProduces() != 
null) {
+                            line += "    (";
+                            if (u.getConsumes() != null) {
+                                line += "accept:" + u.getConsumes();
+                                if (u.getProduces() != null) {
+                                    line += " ";
+                                }
+                            }
+                            if (u.getProduces() != null) {
+                                line += "produce:" + u.getProduces();
+                            }
+                            line += ")";
                         }
                         LOG.info("    {}", line);
                     }

Reply via email to