Pasquale Congiusti created CAMEL-27028:
------------------------------------------

             Summary: [camel-jbang] Log4J shutdownHook not honored in main
                 Key: CAMEL-27028
                 URL: https://issues.apache.org/jira/browse/CAMEL-27028
             Project: Camel
          Issue Type: Bug
    Affects Versions: 4.23.0, 4.22.0
            Reporter: Pasquale Congiusti
            Assignee: Pasquale Congiusti
             Fix For: 4.24.0


When we run or export in camel-main runtime, we are using a configuration file 
that is not honored recently by Log4J, making a shutdown to skip all 
"onshutdown" Camel log. For example:
{code:java}
2026-11-16 11:34:26.697  INFO 162909 --- [           main] 
e.camel.impl.engine.AbstractCamelContext : Apache Camel 4.23.0 (camel-1) 
started in 287ms (build:0ms init:0ms start:287ms boot:1s564ms)
2026-11-16 11:34:27.710  INFO 162909 --- [ - timer://yaml] route1               
                    : Hello Camel from route1
2026-11-16 11:34:28.693  INFO 162909 --- [ - timer://yaml] route1               
                    : Hello Camel from route1
^C2026-11-16 11:34:29.034  INFO 162909 --- [ngupInterceptor] 
e.camel.main.DefaultMainShutdownStrategy : JVM shutdown hook triggered by 
SIGTERM (PID 162909). Shutting down Apache Camel (Main) 4.23.0 {code}
is completely missing the following traces:
{code:java}
2026-11-16 11:34:11.885  INFO 162017 --- [ntloop-thread-0] 
tform.http.vertx.VertxPlatformHttpServer : Vert.x HttpServer stopped
2026-11-16 11:34:11.902  INFO 162017 --- [           main] 
e.camel.impl.engine.AbstractCamelContext : Apache Camel 4.23.0 (camel-1) 
shutdown in 41ms (uptime:0s)
2026-11-16 11:34:11.902  INFO 162017 --- [           main] 
org.apache.camel.main.MainSupport        : Apache Camel (Main) 4.23.0 shutdown
2026-11-16 11:34:11.902  INFO 162017 --- [ngupInterceptor] 
e.camel.main.DefaultMainShutdownStrategy : Apache Camel (Main) 4.23.0 is 
shutdown{code}
and other traces that should be there. This is because the previous 
configuration is not honored.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to