CLI debugging

micah micah at riseup.net
Fri Sep 2 16:25:05 CEST 2016


"Israel G. Lugo" <israel.lugo at lugosys.com> writes:

> On 08/30/2016 02:01 PM, Bernardo Figueiredo wrote:
>> In my opinion:
>> debug (<protocol> | <pattern> | all) (all | off | ( "{" states | routes
>> | filters | interfaces | events | packets "}" ) )  Control protocol
>> debugging via BIRD logs
>>
>> The parethensis are to group all the various options and the "{" and "}"
>> is so it's clearer that we must write { and }.

> Forgetting about the macro for a moment, I think we can still do a
> better explanation. The | here to me indicates a choice, e.g. "either
> states or routes or filters", but in reality the user can combine these
> flags.

Yes, precisely!

> We need something that can say "one or more of: states, routes, filters,
> interfaces, events, packets". It's hard to say this in a single line
> without cluttering everything, though...
>
> If we had more space, we could do something like:
>
> debug (<protocol> | <pattern> | all) (all | off | "{" DEBUG_FLAG, [ DEBUG_FLAG, ... ] "}" ) )  Control protocol debugging via BIRD logs
>   Available DEBUG_FLAGs: states, routes, filters, interfaces, events, packets

I think that this would be a lot clearer.

If it was just the first line, and not the "Available DEBUG_FLAGS" line,
then it would actually be less text than the original (25chars
vs. 32). I'd argue that this second line shouldn't be there anyways, its
the kind of thing you can look up in the man page.

micah


More information about the Bird-users mailing list