Skip to content

Introduce --debug and --verbose as global options #333

@rhuss

Description

@rhuss

In what area(s)?

Describe the feature:

Debugging and verbose output should be treated in a consistent way over all commands. Currently, we have

As there are supposed to be more such output modifying flags coming in over time, I suggest to use --debug and --verbose with categories to fine tune this:

  • Adding --debug for very low-level information. Only useful for developer of kn itself
  • Adding a --verbose option for increasing the detail level of the information presented. Examples are
    • kn service describe --verbose to add more details to a service (like the image digests, or all env vars/annotations/labels)
    • kn plugin list --verbose to also print the plugin directories where plugins are looked up
    • kn service create --debug to print also the HTTP headers

In order to tune debug and verbose output, I'd suggest to introduce categories:

  • --debug --> all debug info
  • --debug=all --> all debug info
  • --debug=http --> only http related debugging
  • --verbose --> all verbose output
  • --verbose=config --> config related information, too
  • --verbose=config,details --> config information and details (made up here to show how to combine categories)

This suggestion would introduce exactly two options, --debug and --verbose (with the possible values shown in the help page). The alternative would be to have an extra option for every category like in --log-http, but this would blow up the help pages and UX surface considerably over time.

Metadata

Metadata

Assignees

Labels

kind/featureNew feature or requesttriage/acceptedIssues which should be fixed (post-triage)

Type

No type

Projects

Status

In Design

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions