Open n-peugnet opened 4 years ago
For this, picocli (the module we use to parse cli args) has a cool feature: repeated boolean options which can be used to define the log level with the number of v
E.g. | command | console log level |
---|---|---|
ppi |
warn | |
ppi -v |
info | |
ppi -vv |
debug | |
ppi -vvv |
trace |
I think the verbosity
option should be used only for the STDOUT
appender and two more options should be added for the LOGFILE
appender:
--log-level
: for the level of the log file (default: debug
but should be changed to info
in main and maybe keep debug on test)--log-file
: the file to use for logging (default: target/ppi.log
but should be changed to some OS dependent standard location)
There is a small problem with this option as we have 2 log levels:
LOGFILE
logger (which is nowdebug
)STDOUT
logger (which is nowwarn
)So I am not sure yet what would this option do. Also do we really want to keep the
STDOUT
logger ?