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

Reduce instrument logging level to debug #101

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

CodingAnarchy
Copy link
Contributor

Closes #100 by reducing the log level to debug when using the instrument attribute macro. This will avoid polluting the INFO logs of downstream users with calls to gcp_auth unless they intentionally turn on the debug logging levels.

@djc djc merged commit e97527a into djc:main Feb 5, 2024
6 checks passed
@djc
Copy link
Owner

djc commented Feb 5, 2024

Thanks!

@bubnov
Copy link

bubnov commented Sep 6, 2024

Actually, the DEBUG level isn't a great choice either, as it makes debugging your own code difficult due to the crate's logs polluting the output.

I suggest changing the log level to TRACE, which is defined as "Designates very low priority, often extremely verbose, information." (and this is the case actually).

Another approach is to use tracing_subscriber crate and to override the crate logs level like RUST_LOG=gcp_auth=NONE, ....

@CodingAnarchy CodingAnarchy deleted the reduce-logging-level branch September 6, 2024 11:43
@djc
Copy link
Owner

djc commented Sep 9, 2024

I'm happy to review a PR that adjusts logging levels.

@bubnov
Copy link

bubnov commented Sep 18, 2024

Maybe later, I'm too busy with the project. Sorry.

Also, I managed to mute the noisy logs using the RUST_LOG environment variable:

RUST_LOG=info,h2=info,hyper_util=info,gcp_auth=info ...

So, for now, the problem doesn't bother me much.

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.

Adjust logging level for tracing crate
3 participants