agent: print more useful shutdown message

This commit is contained in:
Frank Schroeder 2017-05-23 12:15:25 +02:00
parent f15e90bc9a
commit 1df74e36bd
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
1 changed files with 5 additions and 1 deletions

View File

@ -1015,7 +1015,11 @@ func (a *Agent) Shutdown() error {
var err error
if a.delegate != nil {
err = a.delegate.Shutdown()
a.logger.Print("[DEBUG] agent: delegate down")
if _, ok := a.delegate.(*consul.Server); ok {
a.logger.Print("[INFO] agent: consul server down")
} else {
a.logger.Print("[INFO] agent: consul client down")
}
}
pidErr := a.deletePid()