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

reduce noise of log output #976

Merged
merged 1 commit into from May 2, 2022
Merged

Conversation

luhring
Copy link
Contributor

@luhring luhring commented May 2, 2022

This PR dials down the severity of log entries that tend to be hit during common scanning scenarios.

For example, during any project (directory) scans on my macOS machine, I see these log entries every time:

[0008]  WARN directory resolver unable to evaluate symlink for path="/etc/os-release" : lstat /Users/dan/Source/grype-vscode/etc: no such file or directory
[0008]  WARN directory resolver unable to evaluate symlink for path="/usr/lib/os-release" : lstat /Users/dan/Source/grype-vscode/usr: no such file or directory
[0008]  WARN directory resolver unable to evaluate symlink for path="/etc/system-release-cpe" : lstat /Users/dan/Source/grype-vscode/etc: no such file or directory
[0008]  WARN directory resolver unable to evaluate symlink for path="/etc/redhat-release" : lstat /Users/dan/Source/grype-vscode/etc: no such file or directory
[0008]  WARN directory resolver unable to evaluate symlink for path="/bin/busybox" : lstat /Users/dan/Source/grype-vscode/bin: no such file or directory

Additionally, since we're now showing INFO lines by default, Syft has been showing some log lines even with the TUI view that probably don't need to be exposed to users during every run. I've reduced these log instances to DEBUG.

Helps with anchore/grype#684 by removing Syft log entries from routine scanning use cases.

@luhring luhring self-assigned this May 2, 2022
@luhring luhring added the bug Something isn't working label May 2, 2022
Copy link
Contributor

@spiffcs spiffcs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd still like to see:

[0000]  INFO syft version: [not provided]
[0000]  INFO identified distro: Alpine Linux v3.15
[0000]  INFO cataloging image

Provided if someone passes the -v flag to syft. Having INFO and DEBUG are helpful to provide finer layers of detail for users. INFO is always a good first stop to check things and then can progress to -vv.

Currently this change makes it so that

Signed-off-by: Dan Luhring <dan+github@luhrings.com>
@spiffcs spiffcs changed the title Reduce noise of log output reduce noise of log output May 2, 2022
@spiffcs spiffcs enabled auto-merge (squash) May 2, 2022 14:44
@spiffcs spiffcs merged commit 0bd3558 into anchore:main May 2, 2022
@luhring luhring deleted the reduce-log-noise branch May 2, 2022 15:08
spiffcs added a commit that referenced this pull request May 2, 2022
* main: (31 commits)
  reduce noise of log output (#976)
  add version info and remove double config call (#977)
  Rename syft-id to package-id (#970)
  update to cyclonedx-go 0.5.2 (#971)
  refactor command package to remove globals and add dependency injection
  fix: #953 Derive language from pURL - https://github.com/anchore/syft… (#957)
  Fix typo in CPE-parsing error (#966)
  Preserve syft IDs on SBOM decode (#963)
  Update GitHub format package_url and correlator (#961)
  Ensure SPDXIDs are valid (#955)
  Auto-PR needs to run go mod tidy (#958)
  Add workflow for automatic PR for new stereoscope updates (#954)
  Minor readme update to correct format information (#948)
  Update spdx22json to only take uppercase checksum algorithm (#946)
  add additional vendors for springframework (#945)
  Add digest property to parent and nested java package metadata (#941)
  Update write permissions and log into ghcr.io for release (#942)
  Retry auth URL lookup without docker credentialhelper workaround (#939)
  Ensure that all cyclonedx components have bom-refs (#914)
  Additionally publish docker images to GHCR (#934)
  ...

Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
rigzba21 pushed a commit to rigzba21/syft that referenced this pull request May 5, 2022
Signed-off-by: rigzba21 <jonathan.velando01@gmail.com>
GijsCalis pushed a commit to GijsCalis/syft that referenced this pull request Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants