diff --git a/core/runtime/src/main/java/io/quarkus/runtime/Application.java b/core/runtime/src/main/java/io/quarkus/runtime/Application.java index 29ab30d26c662..09f725f83e8e1 100644 --- a/core/runtime/src/main/java/io/quarkus/runtime/Application.java +++ b/core/runtime/src/main/java/io/quarkus/runtime/Application.java @@ -161,6 +161,11 @@ public final void stop() { * stop, that exception is propagated. */ public final void stop(Runnable afterStopTask) { + Logger logger = Logger.getLogger(Application.class); + logger.debugf("Stopping application"); + if (logger.isTraceEnabled()) { + logger.tracef(new RuntimeException("Application Stop Stack Trace"), "Application shutting down"); + } final Lock stateLock = this.stateLock; stateLock.lock(); try { diff --git a/core/runtime/src/main/java/io/quarkus/runtime/ApplicationLifecycleManager.java b/core/runtime/src/main/java/io/quarkus/runtime/ApplicationLifecycleManager.java index ed5870318db36..1d5893b5ec6b4 100644 --- a/core/runtime/src/main/java/io/quarkus/runtime/ApplicationLifecycleManager.java +++ b/core/runtime/src/main/java/io/quarkus/runtime/ApplicationLifecycleManager.java @@ -53,6 +53,11 @@ public class ApplicationLifecycleManager { private static volatile BiConsumer defaultExitCodeHandler = new BiConsumer() { @Override public void accept(Integer integer, Throwable cause) { + Logger logger = Logger.getLogger(Application.class); + logger.debugf("Shutting down with exit code %s", integer); + if (logger.isTraceEnabled()) { + logger.tracef(new RuntimeException("Shutdown Stack Trace"), "Shutdown triggered"); + } System.exit(integer); } }; @@ -275,6 +280,8 @@ private static void registerSignalHandlers(final BiConsumer final SignalHandler exitHandler = new SignalHandler() { @Override public void handle(Signal signal) { + Logger applicationLogger = Logger.getLogger(Application.class); + applicationLogger.debugf("Received signed %s, shutting down", signal.getNumber()); exitCodeHandler.accept(signal.getNumber() + 0x80, null); } };