-
Notifications
You must be signed in to change notification settings - Fork 100
Add logging in project based on 'log' library. #12
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
Conversation
Add stdout logs in tests. Example stdout logging during tests: [2023-08-12T08:45:02Z WARN hf_hub] File with your token is absent by path "C:\\Users\\igumn\\.cache\\huggingface\\token"
Narsil
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution.
Happy to improve a bit the logging, but left a few remarks regarding style.
Happy to make the modifications myself.
|
Can we use tracing instead of env_logger ? |
Yes, there are list of loggers: simple_logger You could visit page https://crates.io/crates/log and find all list of loggers |
|
I was talking about the https://lib.rs/crates/tracing crate specifically :) |
If you ask my opinion. I think, yes it is possible to use tracing libray for logging like log library.
|
Narsil
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ! Thanks for the modifications.
|
I'll go ahead and merge for now, we can revisit later. IMO this crate should be minimalistic, hence logging (and sparingly) should be OK. |
|
For the record, I'm not happy about this 😄
|
|
https://crates.io/crates/tracing (~200k/day) I don't care that much about it either way, ideally I think we just should just have neither, or behind feature flags. |
|
Ah I didn't think log was as ubiquitous, looks like a sync vs async divide, tokio has a dependency on I also thought log had less features for libraries, but either I missed it at the time, either it caught up. |
|
You live in |
Add stdout logs in tests.
Example stdout logging during tests:
[2023-08-12T08:45:02Z WARN hf_hub] File with your token is absent by path "C:\Users\igumn\.cache\huggingface\token"