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

Suppress WARN messages #97

Closed
tosiara opened this issue Nov 24, 2023 · 2 comments
Closed

Suppress WARN messages #97

tosiara opened this issue Nov 24, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request ux Related to the user experience, invocation, or CLI

Comments

@tosiara
Copy link

tosiara commented Nov 24, 2023

Is your feature request related to a problem? Please describe.
I have a git repo that produces a lot of WARN messages like this:

2023-11-24T09:50:49.049926Z  WARN enumerate_git_with_metadata{/opt/mount/.git}: noseyparker::input_enumerator::git_repo_enumerator: Failed to read object header for ff02cea2d8b67ef3e69ef6c547aecccd038af71a: Pack data type not recognized
2023-11-24T09:50:49.050169Z  WARN enumerate_git_with_metadata{/opt/mount/.git}: noseyparker::input_enumerator::git_repo_enumerator: Failed to read object header for ff17b9dd7334c3a69604e8714edf0735dd6841c3: Pack data type not recognized
2023-11-24T09:50:49.050428Z  WARN enumerate_git_with_metadata{/opt/mount/.git}: noseyparker::input_enumerator::git_repo_enumerator: Failed to read object header for ff2a969501f581d10fd4098cc904809277cf1ad6: Pack data type not recognized
2023-11-24T09:50:49.050669Z  WARN enumerate_git_with_metadata{/opt/mount/.git}: noseyparker::input_enumerator::git_repo_enumerator: Failed to read object header for ff3bf6006cccd8ad0940d99c94bff521bddf76ec: Pack data type not recognized
2023-11-24T09:50:49.050884Z  WARN enumerate_git_with_metadata{/opt/mount/.git}: noseyparker::input_enumerator::git_repo_enumerator: Failed to read object header for ff927f216749d375778f04c491a62c839e1dd78c: Pack data type not recognized
2023-11-24T09:50:49.051143Z  WARN enumerate_git_with_metadata{/opt/mount/.git}: noseyparker::input_enumerator::git_repo_enumerator: Failed to read object header for ff9b85229b6fd1a6474d4dcca503d77818e8fa90: Pack data type not recognized
2023-11-24T09:50:49.051390Z  WARN enumerate_git_with_metadata{/opt/mount/.git}: noseyparker::input_enumerator::git_repo_enumerator: Failed to read object header for ffd57b10e0dbba8f15af9e832e8caaa7d850a257: Pack data type not recognized
2023-11-24T09:50:49.051637Z  WARN enumerate_git_with_metadata{/opt/mount/.git}: noseyparker::input_enumerator::git_repo_enumerator: Failed to read object header for ffda378d30399dc4280d861e871ea2b8b08c898f: Pack data type not recognized
2023-11-24T09:50:49.051878Z  WARN enumerate_git_with_metadata{/opt/mount/.git}: noseyparker::input_enumerator::git_repo_enumerator: Failed to read object header for fff3b8ea59601fac54189b9d5fe501fb326406bf: Pack data type not recognized
2023-11-24T09:50:49.052110Z  WARN enumerate_git_with_metadata{/opt/mount/.git}: noseyparker::input_enumerator::git_repo_enumerator: Failed to read object header for fff71a90d65acba0cdccbe7d362b54c6d9059263: Pack data type not recognized

Describe the solution you'd like
Add a command line switch or an env var to suppress that noise

Describe alternatives you've considered
Or at least write those warnings to stderr so it can be piped to dev null

Thanks

@tosiara tosiara added the enhancement New feature or request label Nov 24, 2023
@bradlarsen bradlarsen self-assigned this Nov 27, 2023
@bradlarsen
Copy link
Collaborator

@tosiara thanks for the report!

I agree: the logging output (at least WARN and ERROR messages) should be written to stderr, not stdout as is done currently.

Nosey Parker also already has a -v/--verbose switch, but no corresponding -q/--quiet switch. I'll add that.

Those particular warnings are caused by a bug in the gix library used for picking apart Git repos. That bug has been fixed now, and when that crate releases a new version, it will go in the next Nosey Parker release, and those warnings will be avoided.

@bradlarsen bradlarsen added the ux Related to the user experience, invocation, or CLI label Nov 27, 2023
@bradlarsen
Copy link
Collaborator

@tosiara both issues should be improved in the new v0.16.0 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ux Related to the user experience, invocation, or CLI
Projects
None yet
Development

No branches or pull requests

2 participants