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
Fix #3040 #3078
Fix #3040 #3078
Conversation
sturmer
commented
Sep 20, 2014
- Introduce "notice" log level
- info and notice levels go on stdout, not on stderr
- Label "info:" doesn't get printed on stdout (but does to log file)
Thanks @sturmer! Could you sign the CLA if you haven't already so we can review the commit? (http://rethinkdb.com/community/cla/) |
Hi @neumino, Done! I look forward to some criticism :) |
if (write_res != static_cast<ssize_t>(console_formatted.length())) { | ||
error_out->assign("cannot write to standard error: " + errno_string(get_errno())); | ||
error_out->assign("cannot write to write stream: " + errno_string(get_errno())); |
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 error could be shown to the user, so it should be clear. write stream
is vague. How about cannot write to stdout/stderr
?
Hi @sturmer! Thanks for your pull request. I've left some comments on the changes. There's also one more thing to do, which is to convert some of the existing |
Hi @timmaxw, thanks for your comments, they're really helpful. I'm working on them. |
a260e72
to
5110c1f
Compare
Started to address your considerations @timmaxw, got to find a little more time to separate info messages into info/notice. When you have time, do you mind having another look to see if I got right your comments? |
The changes look good so far. Don't forget to omit the |
4977710
to
d17bed9
Compare
Hi @timmaxw, I made another iteration over the code after your comments. About Re: the separation between info and notice levels, I've tried to separate them with the criteria shown in the Wikipedia entry for syslog (see commit 7b8c3ee). Any comments are welcome, as usual. |
Following the discussion in #3040, I think we should decide whether something is a "notice" or "info" by considering whether the user wants to see it on the console or not. So most of the messages that RethinkDB prints at startup should be "notice", but the error messages for bad HTTP input should be "info" (or maybe "warning"). |
7b8c3ee
to
16494b4
Compare
@timmaxw: I've tried to follow the updated criteria. I might be not completely aware of the role of "the user", so the distinction that I've coded and the one you were stating in the previous comments might be misaligned. Please let me know if you feel it may be useful to discuss this on IRC. |
Hi @sturmer. Your changes are mostly in line with what I was thinking of, but there are a few things I would do differently:
|
The |
16494b4
to
3e78aa6
Compare
The info/notice separation looks good, but I'm getting a crash on startup:
|
Hi @timmaxw, I think I've seen the problem. Next time I'll make sure to run the server before claiming anything done :$ |
- Introduce "notice" log level - info and notice levels go on stdout, not on stderr - Label "info:" doesn't get printed on stdout (but does to log file)
It remains to substitute the level of some of the messages from `info' to `notice'.
Also solve minor compilation errors.
Promoted some of the worse situations' messages into WARNING, as per the discussion on rethinkdb#3040.
The agreement should be, as per @timmaxv's latest comment: a message goes to NOTICE if the answer to the question "Is this message useful for a user running RethinkDB manually?" is yes.
25b5b57
to
cb4643f
Compare
@timmaxw, do you mind trying it again? |
OK, everything looks good. I've merged it into |