diff --git a/handler/src/main/java/io/jeyong/handler/ApplicationTerminator.java b/handler/src/main/java/io/jeyong/handler/ApplicationTerminator.java index 1dc168a..e33d0bc 100644 --- a/handler/src/main/java/io/jeyong/handler/ApplicationTerminator.java +++ b/handler/src/main/java/io/jeyong/handler/ApplicationTerminator.java @@ -1,9 +1,13 @@ package io.jeyong.handler; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import sun.misc.SignalHandler; public abstract class ApplicationTerminator { + private static final Logger logger = LoggerFactory.getLogger(ApplicationTerminator.class); + private final String terminationMessagePath; private final String terminationMessage; @@ -14,6 +18,7 @@ protected ApplicationTerminator(final String terminationMessagePath, final Strin public SignalHandler handleTermination() { return signal -> { + logger.info("Received SIGTERM signal. Initiating termination handler."); FileUtils.writeToFile(terminationMessagePath, terminationMessage); System.exit(getExitCode()); };