Add verbosity to `controller-gen`
grzesuav opened this issue · 6 comments
grzesuav commented
Recently I stumble upon a situation when running controller gen had no effect
controller-gen crd:headerFile="hack/boilerplate.go.txt",year=2024 paths="./pkg/api/..." output:dir="."
for the crd
gen, but worked fine for object
gen
controller-gen object:headerFile="hack/boilerplate.go.txt",year=2024 paths="./pkg/api/..."
(it produced output)
When I wanted to dig into it, I realized there is no way to enable verbose
output in controller-gen, which would help to debug it.
Would be nice to have this feature
grzesuav commented
Initial idea would be to add logr.Logger
interface, configure some initial logger (like zap) and add a flag to enable verbose logging - of course as writing to sdtout it would conflict with output:stdout
but it is expected