docker / scout-cli

Docker Scout CLI
https://docker.com/products/docker-scout
Other
250 stars 60 forks source link

SBOM command with `-o` flag logs progress in JSON lines #100

Closed dvdksn closed 4 days ago

dvdksn commented 4 months ago

When exporting an SBOM to a file with the--output flag, the log output is printed as raw json lines in the terminal.

docker scout sbom --format spdx -o sbom.spdx.json docker/scout-cli:latest
{"level":"info","msg":"SBOM of image already cached, 250 packages indexed\n","time":"2024-02-14T14:22:08+01:00"}
{"level":"info","msg":"Report written to sbom.spdx.json\n","time":"2024-02-14T14:22:08+01:00"}

I guess it should look the same as for the other commands, e.g.

docker scout quickview docker/scout-cli:latest
    ✓ SBOM of image already cached, 250 packages indexed
cdupuis commented 4 months ago

The json logs are in purpose for some conditions as DD needed them to show progress. Not sure that is still the case.