Closed stuartc closed 1 year ago
Ah, good point.
It's because I've over engineered log
to support stuff like --log compiler=debug runtime=none
. Which is useful but only in niches.
I have been thinking for ages about just supporting --debug
--info
flags, which is really all you want to do 90% of the time and adding --log
is annoying
I could probably make the command parser much smarter too to avoid this sort of thing
Ah interesting, that is super cool... perhaps a less sexy but equally flexible way is to make it like: --log compiler=debug,runtime=none
... Just to make the whole space delimited greedy args thing a non-issue?
Yes, that's absolutely an option! It's ok for the log syntax to be a bit dogmatic because it'll rarely be used
While I'm in the area - the error if you pass a bad log level isn't very nice. We should process.exit as we have started doing with other errors to avoid the stacktrace.
The error thing should actually be fixed in #350 :ok_hand:
It appears that the
--log
flag considersinstall
as a log level in this example.Perhaps the list of log levels should be either singular or comma separated. It must be at the end of the command in order to work.
We should either document this in the
--help
description or make it non-greedy.