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

subscriber: enable TestWriter to write to stderr #3187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

d-e-s-o
Copy link
Contributor

@d-e-s-o d-e-s-o commented Jan 5, 2025

It can be useful to have a TestWriter that does not log to stdout but stderr instead. For example, that allows for potentially easier filtering of tracing output (because the remaining output of, say, cargo test goes to stdout) or to mirror behavior of env_logger, which by default logs to stderr.
Introduce the TestWriter::with_stderr() constructor to enable such usage. The default is left unchanged.

It can be useful to have a TestWriter that does not log to stdout but
stderr instead. For example, that allows for potentially easier
filtering of tracing output (because the remaining output of, say, cargo
test goes to stdout) or to mirror behavior of env_logger, which by
default logs to stderr.
Introduce the TestWriter::with_stderr() constructor to enable such
usage. The default is left unchanged.
@d-e-s-o d-e-s-o requested review from hawkw, davidbarsky and a team as code owners January 5, 2025 21:51
d-e-s-o added a commit to d-e-s-o/test-log that referenced this pull request Jan 5, 2025
env_logger was doing it, tracing wasn't. Make sure that both do it.

Requires tokio-rs/tracing#3187
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant