When using graceful shutdown with Jetty, current requests are written with system.out instead of logger. Was it intentional? Here is the code piece:
org.springframework.boot.web.embedded.jetty.GracefulShutdown#awaitShutdown
private void awaitShutdown(GracefulShutdownCallback callback) {
while (this.shuttingDown && this.activeRequests.get() > 0) {
sleep(100);
}
System.out.println(this.activeRequests.get());
this.shuttingDown = false;
long activeRequests = this.activeRequests.get();
if (activeRequests == 0) {
logger.info("Graceful shutdown complete");
callback.shutdownComplete(GracefulShutdownResult.IDLE);
}
else {
logger.info(LogMessage.format("Graceful shutdown aborted with %d request(s) still active", activeRequests));
callback.shutdownComplete(GracefulShutdownResult.REQUESTS_ACTIVE);
}
}
Looks like logger is already used in this method. I can fix it if ok.
Comment From: wilkinsona
No, that's not intentional. Looks like it's a leftover from getting things working with Jetty 12. Thanks for spotting it. A PR that removes it would be great please. Thanks.
Comment From: scottfrederick
Closing in favor of #39360