Skip to content

log level for os error is set to INFO level #13454

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

Closed
argnmp opened this issue Feb 17, 2024 · 3 comments
Closed

log level for os error is set to INFO level #13454

argnmp opened this issue Feb 17, 2024 · 3 comments
Labels
A-caching Area: caching of dependencies, repositories, and build artifacts C-bug Category: bug S-needs-team-input Status: Needs input from team on whether/how to proceed.

Comments

@argnmp
Copy link

argnmp commented Feb 17, 2024

Problem

"cargo run" command in my environment has always tried to update crates.io index. ("Updating crates.io index")

I couldn't find out the reason why this happens until I debug cargo log using log level "debug"

2024-02-17T06:58:19.029438Z  INFO cargo::sources::registry::index: failed to write cache: Permission denied (os error 13)

The problem was that cargo did not have permission to write cache. The log level for "os error" was set to INFO, so I couldn't figure it out because default log level for CARGO_LOG is warn.

Steps

No response

Possible Solution(s)

It would be better to change log level for (os error) to "warn" or "error".

Notes

No response

Version

cargo 1.73.0 (9c4383fb5 2023-08-26)
release: 1.73.0
commit-hash: 9c4383fb55986096b414d98125421ab87b5fd642
commit-date: 2023-08-26
host: aarch64-apple-darwin
libgit2: 1.6.4 (sys:0.17.2 vendored)
libcurl: 8.4.0 (sys:0.4.65+curl-8.2.1 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 1.1.1u  30 May 2023
os: Mac OS 14.2.1 [64-bit]
@argnmp argnmp added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels Feb 17, 2024
@epage
Copy link
Contributor

epage commented Feb 19, 2024

CARGO_LOG / logging is generally focused more on development related information. We generally control user facing information with --verbose / --quiet flags.

So if we exposed this, it would likely be a note: message that we report to the user. I suspect this was silenced to avoid annoying the user intentionally in this situation by printing a note on every command invocation. The downside being that you have to dig into the logs to figure out what is going on. If its not already, we could tie this note: to --verbose or --verbose --verbose so users don't have to go to logs to figure out what is going on.

@epage epage added A-caching Area: caching of dependencies, repositories, and build artifacts S-needs-team-input Status: Needs input from team on whether/how to proceed. and removed S-triage Status: This issue is waiting on initial triage. labels Feb 19, 2024
@ehuss
Copy link
Contributor

ehuss commented Dec 10, 2024

Note this is almost identical to #13712.

@ehuss
Copy link
Contributor

ehuss commented Feb 4, 2025

This message has been changed to be a warning via #15014, so closing as resolved via that.

@ehuss ehuss closed this as completed Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-caching Area: caching of dependencies, repositories, and build artifacts C-bug Category: bug S-needs-team-input Status: Needs input from team on whether/how to proceed.
Projects
None yet
Development

No branches or pull requests

3 participants