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

Use -v, -vv, -vvv to configure tracing levels #1569

Open
zanieb opened this issue Feb 17, 2024 · 4 comments
Open

Use -v, -vv, -vvv to configure tracing levels #1569

zanieb opened this issue Feb 17, 2024 · 4 comments
Labels
enhancement New feature or improvement to existing functionality help wanted Contribution especially encouraged tracing Verbose output and debugging

Comments

@zanieb
Copy link
Member

zanieb commented Feb 17, 2024

Right now, as mentioned in #1567, we show a lot of output in -v.

We should have -v be more user friendly and use -vv and -vvv to dump more verbose tracing information.

@zanieb zanieb added enhancement New feature or improvement to existing functionality tracing Verbose output and debugging labels Feb 17, 2024
@olivierlefloch
Copy link
Contributor

I may be missing something, but related to this, it would be great if the -vvv level also displayed calls to trace, for example to debug

#1458

I'd like to be able to see the method that fresh_request invoked. I'm not familiar enough with ruff's tracing/logging, but perhaps

trace!("Sending fresh {} request for {}", req.method(), req.url());

could be logged?

@zanieb
Copy link
Member Author

zanieb commented Feb 18, 2024

You can control the log level during verbose mode with e.g. RUST_LOG=trace for now.

I totally agree though.

@olivierlefloch
Copy link
Contributor

Thanks for the tip! Actually, that failed when running uv with RUST_LOG=trace python -m uv … but worked with RUST_LOG=trace uv … 👍

I'd suggest adding it to CONTRIBUTING.md as that's where I imagined I might be able to find this information: #1670

zanieb pushed a commit that referenced this issue Feb 19, 2024
<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

This improves Contributing documentation to specifically mention `trace`
level logging can be obtained via `RUST_LOG=trace uv …` as mentioned
here:
#1569 (comment)

## Test Plan

Compare the output of

```
uv pip install --verbose requests
```

and

```
RUST_LOG=trace uv pip install --verbose requests
```
@zanieb
Copy link
Member Author

zanieb commented Feb 19, 2024

The python -m ... issue should be fixed by #1667

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality help wanted Contribution especially encouraged tracing Verbose output and debugging
Projects
None yet
Development

No branches or pull requests

2 participants