djc / gcp_auth

Minimal authentication library for Google Cloud Platform (GCP)
Other
63 stars 38 forks source link

Reduce instrument logging level to debug #101

Closed CodingAnarchy closed 9 months ago

CodingAnarchy commented 9 months ago

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 commented 9 months ago

Thanks!

bubnov commented 2 months ago

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, ....

djc commented 1 month ago

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

bubnov commented 1 month ago

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.