Merge pull request #7798 from calvin0327/fix-sdNotify
fix sdNotify func when debug level
This commit is contained in:
commit
5e51347a63
@ -36,10 +36,13 @@ func notifyStopping(ctx context.Context) error {
|
||||
|
||||
func sdNotify(ctx context.Context, state string) error {
|
||||
notified, err := sd.SdNotify(false, state)
|
||||
log.G(ctx).
|
||||
WithError(err).
|
||||
WithField("notified", notified).
|
||||
entry := log.G(ctx)
|
||||
if err != nil {
|
||||
entry = entry.WithError(err)
|
||||
}
|
||||
entry.WithField("notified", notified).
|
||||
WithField("state", state).
|
||||
Debug("sd notification")
|
||||
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user