From a3d0d97a9b52e728cf6228f937598c2d4e85b2da Mon Sep 17 00:00:00 2001 From: Jerry Buss Date: Thu, 14 Nov 2024 13:05:07 -0700 Subject: [PATCH] Add listening address to shutdown logging output to better see which server is stopping. --- server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.go b/server.go index d595fbf..cd79ab3 100644 --- a/server.go +++ b/server.go @@ -115,11 +115,11 @@ func (this *defaultServer) watchShutdown(waiter *sync.WaitGroup) { <-this.softContext.Done() // waiting for soft context shutdown to occur ctx, cancel := context.WithTimeout(this.hardContext, this.shutdownTimeout) // wait until shutdownTimeout for shutdown defer cancel() - this.logger.Printf("[INFO] Shutting down HTTP server...") + this.logger.Printf("[INFO] Shutting down HTTP server [%s]...", this.listenAddress) shutdownError = this.httpServer.Shutdown(ctx) } func (this *defaultServer) awaitOutstandingRequests(err error) { - defer this.logger.Printf("[INFO] HTTP server shutdown complete.") + defer this.logger.Printf("[INFO] HTTP server shutdown complete. [%s]", this.listenAddress) if err == nil { return