Skip to content
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

Should `rlang::inform()` use `stdout()` by default? #852

jimhester opened this issue Oct 21, 2019 · 1 comment · Fixed by #865


Copy link

@jimhester jimhester commented Oct 21, 2019

One issue with base::message() is that it outputs to stderr(), which while it works great for terminal usage, in RStudio and in the Windows GUI causes the output to be in red.

I just did a workaround for this in vroom. Maybe we should do this by default in rlang::inform()?

Currently some packages (such as usethis) use cat() for user messaging to avoid the red text issue, but they really should use message conditions, so users can use suppressMessages() to suppress the messages.


This comment has been minimized.

Copy link

@lionel- lionel- commented Oct 28, 2019

We could send to stdout if the session is interactive, and stderr otherwise. This way the output of messages can be filtered out when piping.

lionel- added a commit to lionel-/rlang that referenced this issue Nov 12, 2019
Closes r-lib#852
@lionel- lionel- closed this in #865 Nov 12, 2019
lionel- added a commit that referenced this issue Nov 12, 2019
Closes #852
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.