client icon indicating copy to clipboard operation
client copied to clipboard

Introduce --debug and --verbose as global options

Open rhuss opened this issue 6 years ago • 10 comments

In what area(s)?

Describe the feature:

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

  • kn plugin list --verbose as in #313 for printing out plugin configuration
  • kn service describe --details as in #252 for showing additional service information
  • --log-http as a global option to track HTTP API communication coming in with #326

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.

rhuss avatar Aug 06 '19 06:08 rhuss

Should be tackled together with #182 IMO

rhuss avatar Sep 10 '19 17:09 rhuss

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Oct 15 '20 01:10 github-actions[bot]

/remove-lifecycle stale

rhuss avatar Nov 10 '20 10:11 rhuss

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Feb 09 '21 01:02 github-actions[bot]

/remove-lifecycle stale

dsimansk avatar Feb 12 '21 09:02 dsimansk

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar May 14 '21 01:05 github-actions[bot]

/remove-lifecycle stale

rhuss avatar Jun 01 '21 07:06 rhuss

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Aug 31 '21 01:08 github-actions[bot]

/remove-lifecycle stale

rhuss avatar Sep 01 '21 17:09 rhuss

Related to this issue

  • #182 -- --quiet is kind of the opposite of --verbose
  • #390 -- --log-http should be included as part of --debug=http

rhuss avatar Nov 17 '21 08:11 rhuss