-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The returned err should be printed #32167
Conversation
This is fine, but maybe as a debug message. |
0e7a157
to
87d0a3a
Compare
@cpuguy83 |
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -121,6 +121,8 @@ func (d *daemonDiscoveryReloader) advertiseHeartbeat(address string) { | |||
if err := d.initHeartbeat(address); err == nil { | |||
ready = true | |||
close(d.readyCh) | |||
} else { | |||
logrus.WithError(err).Debug("First discovery heartbeat failed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we print the detailed error, like:
logrus.WithError(err).Debugf("First discovery heartbeat failed: %v", err)
ping @cpuguy83
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would just be the error string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@allencloud WithError(err)
will do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Yanqiang Miao miao.yanqiang@zte.com.cn