Skip to content

Commit a3d0d97

Browse files
committed
Add listening address to shutdown logging output to better see which server is stopping.
1 parent 081c046 commit a3d0d97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,11 @@ func (this *defaultServer) watchShutdown(waiter *sync.WaitGroup) {
115115
<-this.softContext.Done() // waiting for soft context shutdown to occur
116116
ctx, cancel := context.WithTimeout(this.hardContext, this.shutdownTimeout) // wait until shutdownTimeout for shutdown
117117
defer cancel()
118-
this.logger.Printf("[INFO] Shutting down HTTP server...")
118+
this.logger.Printf("[INFO] Shutting down HTTP server [%s]...", this.listenAddress)
119119
shutdownError = this.httpServer.Shutdown(ctx)
120120
}
121121
func (this *defaultServer) awaitOutstandingRequests(err error) {
122-
defer this.logger.Printf("[INFO] HTTP server shutdown complete.")
122+
defer this.logger.Printf("[INFO] HTTP server shutdown complete. [%s]", this.listenAddress)
123123

124124
if err == nil {
125125
return

0 commit comments

Comments
 (0)