Bug #14725
closedVerbose mode does not work and is inconsistent
Description
Global flag -v does not seem to work at all.
Do not remove it, it makes sense to have it. In UNIX, commands usually do not print info messages (like "Host created"). Create a method like print_verbose and use it for all info messages (crate, update, delete). These messages should appear on stdout only when -v flag was provided.
Updated by Tomáš Strachota over 8 years ago
- Related to Tracker #14914: Tracker for output related issues added
Updated by Oleh Fedorenko about 7 years ago
- Status changed from New to Assigned
- Assignee set to Oleh Fedorenko
Updated by Tomáš Strachota about 7 years ago
I'm adding some implementation notes.
At the moment -v has the same effect as -d - it prints logs to stdout. I don't think it was a good choice and in my opinion we should keep only -d for that purpose. At the same time I think it would be confusing for users if we suddenly started using that flag for something else. We should deprecate it first. --verbosity or something similar could be used from the start (it's longer I know).
Verbosity should be added to following places in hammer output:- add verbosity attribute to #print_message, default is 1
- add verbosity attribute to #print_error, not sure what the default value should be here
- add verbosity to fields in output definition
All those messages/fields would be printed only when their verbosity is <= than what a user asked for.
Verbosity should also be configurable in settings.
In order to keep the current behavior unless user explicitly changes the settings, I think that what Lukas describes should be verbosity 0 and default should be 1 (or some other value, but one step higher).
PS: Pagination details in #print_record methods should probably be printed only with higher verbosities.
Updated by The Foreman Bot about 7 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli/pull/263 added
Updated by The Foreman Bot about 7 years ago
- Pull request https://github.com/theforeman/hammer-cli-foreman/pull/344 added
Updated by Tomáš Strachota over 6 years ago
- Related to Feature #24110: hammer host list add fields domain_name and last_checkin added
Updated by Martin Bacovsky over 6 years ago
- Related to Feature #24581: Add option to completely suspend progress bar from hammer commands added
Updated by Oleh Fedorenko over 6 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset b55940355ad11752ad6324b2119b7025080a9fe2.
Updated by Ori Rabin almost 6 years ago
- Related to Bug #26453: undefined method `meta' error seen when using --output table option with hammer cli added
Updated by Martin Bacovsky over 5 years ago
- Triaged set to No
- Fixed in Releases hammer-cli-0.15.0 added