Commands like tmt plan show or tmt test show display different amounts of detail based on verbosity flags, but the level gating is done through ad-hoc verbosity checks scattered across show() methods.
Since print() is the method responsible for structured output to stdout, it should support a level parameter — analogous to how info(level=N) controls user-facing logging on stderr. This would give developers a consistent way to gate output detail. For example:
print() / level 0 — essential fields (name, summary)
print(level=1) — additional fields (fmf id, web link)
print(level=2) — full details (fmf sources)
The proposal is to:
- Add an optional
level parameter to print() (defaulting to 0)
Commands like
tmt plan showortmt test showdisplay different amounts of detail based on verbosity flags, but the level gating is done through ad-hoc verbosity checks scattered acrossshow()methods.Since
print()is the method responsible for structured output tostdout, it should support alevelparameter — analogous to howinfo(level=N)controls user-facing logging onstderr. This would give developers a consistent way to gate output detail. For example:print()/ level 0 — essential fields (name, summary)print(level=1)— additional fields (fmf id, web link)print(level=2)— full details (fmf sources)The proposal is to:
levelparameter toprint()(defaulting to 0)