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

docs: document how to mimic --verbose with environment variable RUST_LOG #8858

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion crates/uv-static/src/env_vars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,10 @@ impl EnvVars {

/// If set, uv will use this value as the log level for its `--verbose` output. Accepts
/// any filter compatible with the `tracing_subscriber` crate.
/// For example, `RUST_LOG=trace` will enable trace-level logging.
/// For example:
/// * `RUST_LOG=uv=debug` is the equivalent of adding `--verbose` to the command line
/// * `RUST_LOG=trace` will enable trace-level logging.
///
/// See the [tracing documentation](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#example-syntax)
/// for more.
pub const RUST_LOG: &'static str = "RUST_LOG";
Expand Down
4 changes: 3 additions & 1 deletion docs/configuration/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ uv respects the following environment variables:
- <a id="TRACING_DURATIONS_FILE"></a> [`TRACING_DURATIONS_FILE`](#TRACING_DURATIONS_FILE): Use to create the tracing durations file via the `tracing-durations-export` feature.
- <a id="RUST_LOG"></a> [`RUST_LOG`](#RUST_LOG): If set, uv will use this value as the log level for its `--verbose` output. Accepts
any filter compatible with the `tracing_subscriber` crate.
For example, `RUST_LOG=trace` will enable trace-level logging.
For example:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is generated from crates/uv-static/env_vars.rs, you should change that file instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops! thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, sadly the doc generator removes the empty line after the bullet points, which will break the formatting :|

* `RUST_LOG=uv=debug` is the equivalent of adding `--verbose` to the command line
* `RUST_LOG=trace` will enable trace-level logging.
See the [tracing documentation](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#example-syntax)
for more.
- <a id="UV_ENV_FILE"></a> [`UV_ENV_FILE`](#UV_ENV_FILE): `.env` files from which to load environment variables when executing `uv run` commands.
Expand Down
Loading