cosign icon indicating copy to clipboard operation
cosign copied to clipboard

`--verbose` should be respected in more places

Open znewman01 opened this issue 2 years ago • 3 comments

Original title: sign-blob seems to ignore --verbose

$ cosign version 2>&1 | grep GitVersion
GitVersion:    v1.6.0
$ export COSIGN_EXPERIMENTAL=1
$ IMAGE_DIGEST=$(cosign upload blob -f /dev/null ttl.sh/$(openssl rand -hex 8):5m)
$ cosign sign --verbose $IMAGE_DIGEST 2> sign.log
$ cosign sign-blob --verbose /dev/null 2> sign-blob.log
$ grep HTTP sign.log | wc
24     122    2729
$ grep HTTP sign-blob.log | wc
0       0       0

znewman01 avatar Mar 31 '22 16:03 znewman01

The verbose flag appears to only enable the debug logger which doesn't seem to be used anywhere outside of go-containerregistry packages :sweat_smile:

https://github.com/sigstore/cosign/blob/ac682db9511cc610d5a37704776300421d2c5e30/cmd/cosign/cli/commands.go#L57

eddiezane avatar Mar 31 '22 22:03 eddiezane

Ahh yeah that'll do it.

I'd really quite like the --verbose flag to be a lot more useful so maybe this is a FR for adding it to other HTTP calls.

znewman01 avatar Mar 31 '22 23:03 znewman01