Skip to content

Update debug middleware #3440

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

Merged
merged 2 commits into from
Mar 21, 2021
Merged

Update debug middleware #3440

merged 2 commits into from
Mar 21, 2021

Conversation

jtgeibel
Copy link
Member

The first commit drops the ability to enable this middleware on production. With current traffic levels this isn't very practical (as concurrent requests can interleave their output), and we don't want to log headers that may contain authorization cookies or tokens.

The second commit silences the debug information by default during local development. It can be re-enabled by setting the RUST_LOG environment variable appropriately.

r? @Turbo87

This hasn't been used in years, and I'm not sure it would be helpful
with current production traffic (concurrent requests can interleave
their output). We should be able to build out something more targed with
`tracing`.
All this output is annoying during local development, and can be easily
accessed if necessary via the `RUST_LOG` environment variable.
@Turbo87
Copy link
Member

Turbo87 commented Mar 21, 2021

@bors r+

seems like a good idea :)

any thoughts on making the environment check a compile-time flag?

@bors
Copy link
Contributor

bors commented Mar 21, 2021

📌 Commit 6a602e6 has been approved by Turbo87

@bors
Copy link
Contributor

bors commented Mar 21, 2021

⌛ Testing commit 6a602e6 with merge db2c059...

@bors
Copy link
Contributor

bors commented Mar 21, 2021

☀️ Test successful - checks-actions
Approved by: Turbo87
Pushing db2c059 to master...

@bors bors merged commit db2c059 into rust-lang:master Mar 21, 2021
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.

4 participants