See #368. For error cases that were about missing commands or invalid argument sets, the logic that set up zerolog was never invoked, which meant that the output was a JSON blob instead of the prettily-formatted zerolog output. This makes the output more visually consistent.
Changes
Add init to command that sets up logging in the event that zl.RunE isn't actually called.
Testing
Review. Checkout, go build cmd/zed/.., and run the resulting binary with some invalid args. ./main foo and ./main validate should do it.
Fixes #368
Description
See #368. For error cases that were about missing commands or invalid argument sets, the logic that set up
zerolog
was never invoked, which meant that the output was a JSON blob instead of the prettily-formatted zerolog output. This makes the output more visually consistent.Changes
init
to command that sets up logging in the event thatzl.RunE
isn't actually called.Testing
Review. Checkout,
go build cmd/zed/..
, and run the resulting binary with some invalid args../main foo
and./main validate
should do it.