-
Notifications
You must be signed in to change notification settings - Fork 676
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
Logging to stdout (instead of stderr) is a wrong default #2492
Comments
Also surprised with this. |
stdout will flush on newlines (uses std::io::LineWriter under the hood). Should be natural for any logging library to just write-out stuff in lines (or use |
I agree that it would probably be more correct to make stderr the default. We should probably change it. IMO, changing the default output stream is semver-breaking, so we would need to do this in a |
Bug Report
I just lost decent amount of time debugging a problem that turned out to be
tracing-subscriber
logging tostdout
which was overlooked during refactoring. This is a second, if not third time in the recent past where I've dealt with wrong defaults intracing-subscriber
creating issues.I don't recall ever wanting to get my log output to
stdout
, and as far as I can tell logging to stderr is a well estabilished convention, to separate main program output from diagnostics.At very least
env_logger
defaults tostderr
, so does e.g. slog-term, so do most logging libraries I've used and can remember.Is there any reason why
tokio-subscriber
would go against this convention?I realize that at this point reverting the default might be a hassle, but just want to point it out and ask.
The text was updated successfully, but these errors were encountered: