fix: reduce warn levels to debug for unactionable errors #3645
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR just updates the majority of WARN log calls to DEBUG, these should all be messages that contain information that really isn't actionable by the user: for example, a user wouldn't be expected to modify the material that they are scanning to fix package.json errors, these would likely be in a prebuilt container or other source not controlled by the user; and a user would not be expected to modify syft code due to a bug.
I've tried to leave as warnings things that are actionable, things like invalid configuration: misconfigured cache directories, invalid cataloger selection, etc.. I've also updated any uses of
log.WithFields
that were also using a formatted message to just include the data as fields, e.g.log.WithFields(..).Debugf(...)
->log.WithFields(..., <data used in Debugf>).Debug(...)
.Type of change
Checklist: