-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
etcdctl snapshot mixes stdout and stderr #9179
Comments
Fix etcd-io#9179. Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
From user's perspective, only the error message should go into stderr, i.e. last line with |
what messages did you see went into stdout? it is wrong that only error should go to stderr. users should expect only result of the command goes (the matched text of grep command for example) into stdout, which is the common practice of unix program. All informational or diagnostic messages go to stderr. |
I agree with that. But is the "resolving ..." messages considered "diagnostic message"? Because the last line should contain enough message to diagnose. |
yes. it is informational rather than the executing result of the command. it should go to stderr. only the result of the command should go to stdout. for restore/bakup, probably we can output |
closing this out since etcdctl does the right thing. |
etcdctl snapshot restore
command mixes stdout and stderr message into stderr. This is due to capnslog sets it by default:https://github.com/coreos/etcd/blob/0f1ac0cef6834f0927dec74b0f0bf4d0dad9b763/cmd/vendor/github.com/coreos/pkg/capnslog/init.go#L36
It is better to only write error messages into stderr.
The text was updated successfully, but these errors were encountered: