[Fuego] quiet vs verbose

Tim.Bird at sony.com Tim.Bird at sony.com
Thu Jun 28 07:40:13 UTC 2018



> -----Original Message-----
> From: Daniel Sangorrin 
> > -----Original Message-----
> > From: Tim Bird <tbird20d at gmail.com>
> >
> > On Tue, Jun 12, 2018 at 11:12 PM, Daniel Sangorrin
> > <daniel.sangorrin at toshiba.co.jp> wrote:
> > >> -----Original Message-----
> > >> From: Tim.Bird at sony.com [mailto:Tim.Bird at sony.com]
> > ...
> > > What do you think about these usage?
> > >
> > > default: machine readable output (like previous "quiet")
> > > -q: no output at all
> > This is probably better, as that's what most users would expect
> >
> > > -v: verbose (like previous "not quiet")
> > > -vv: more verbose (like previous "verbose")
> > > -vvv: ftc debug messages (like previous "debug")
> > > --debug: parameter for FUEGO_DEBUG that has no effect on ftc (passed
> only to
> > add-jobs and run-test)
> >
> > I like some of these distinctions, but would prefer the following:
> >
> > -q: no output at all.
> 
> Thinking twice, the user can always redirect output to /dev/null. For that
> reason, we don't really need this option, do we?
You're right.  I don't think we need an option for no output at all.
I can't think of an operation that ftc does where this makes sense.

> 
> > (no options): same as now (human readable, non-verbose)
> > -v: same as now (human readable, verbose)
> > -v-: what -q used to be (machine readable, or "not verbose")
> 
> humm It looks a bit weird to me.
> How about --machine-readable? (explicit, long but easy to understand)
That's OK with me.  Can we leave an undocumented '-q' in
just for my convenience?  Odd as it sounds, I sometimes use the 
machine-readable format on the command line.

> Note: using --machine-readable and -v or --debug at the same time should
> give an error?
Yes.

> 
> > --debug xx: used for debug, but with one bit reserved for ftc internal
> > debug (16)
> > (so, '--debug 16' would be the equivalent of the old '--debug', and
> > '--debug 31' would debug
> > everything, including ftc.  Turning on flags for operations not performed
> (e.g.
> > the parser debug flag, when you're doing 'ftc list-nodes', would have no
> effect.
> 
> I would rather separate the API from the implementation. For example,
> instead
> of using bitmaps in the API we can use easy-to-remember words like "--
> debug ftc,parser,charting".
> Then, it will be easy to change the implementation if we happen to run out of
> bits.

That's a great idea.  It's easier to understand for the user, and the code
to handle It will be easier to maintain and extend for developers.
The bitmask idea is probably just a leftover idea from my C programming
days that is better left behind.  I need to get with the times and start using
strings for things.  One thing - it might be nice to have a shorthand for
all items, like  "--debug all".

 -- Tim


More information about the Fuego mailing list