There's a number of existing commands that use the -d option (eg for
specifying a directory) so I think we want to stcik with just --debug
2. Does it make sense to allow -q and --debug together?
If you want debug, then I think you would want everything else as well
3. show-log
I think if verbose is specified, that could turn on show-log. Do we
still need show-log? I'm not sure we do. For a user's perspective, I
want to see either:
i. nothing at all except errors... option = "--quiet"
ii. informational lines that signpost where the command is up to as it
executes (without timestamps etc)... the default, option = ""
iii. verbose output with timestamps and some more detail... option =
"--verbose"
As a developer, I also want:
iv. debug output with everything... option = "--debug"
I'm not sure with the above if show-log is still relevant.
As for the stdout vs stderr thing, I can see both sides. My initial view
is that stderr is for all log outout and stdout is for command results
in json/yaml etc
A few questions.
1. -d for debug is sorta bad
There's a number of existing commands that use the -d option (eg for
specifying a directory) so I think we want to stcik with just --debug
2. Does it make sense to allow -q and --debug together?
If you want debug, then I think you would want everything else as well
3. show-log
I think if verbose is specified, that could turn on show-log. Do we
still need show-log? I'm not sure we do. For a user's perspective, I
want to see either:
i. nothing at all except errors... option = "--quiet"
ii. informational lines that signpost where the command is up to as it
executes (without timestamps etc)... the default, option = ""
iii. verbose output with timestamps and some more detail... option =
"--verbose"
As a developer, I also want:
iv. debug output with everything... option = "--debug"
I'm not sure with the above if show-log is still relevant.
As for the stdout vs stderr thing, I can see both sides. My initial view
is that stderr is for all log outout and stdout is for command results
in json/yaml etc
https:/ /codereview. appspot. com/22320043/ diff/1/ cmd/logging. go
File cmd/logging.go (right):
https:/ /codereview. appspot. com/22320043/ diff/1/ cmd/logging. go#newcode77 `"verbose" and "quiet" flags
cmd/logging.go:77: return fmt.Errorf(
clash`)
perhaps
"verbose" and "quiet" flags clash, please use one or the other, not both
https:/ /codereview. appspot. com/22320043/