Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a verbosity option #68

Open
n-peugnet opened this issue Jun 15, 2020 · 2 comments
Open

Add a verbosity option #68

n-peugnet opened this issue Jun 15, 2020 · 2 comments
Labels
disscussion This issue needs discussion easy Not too hard to do feature New feature or request

Comments

@n-peugnet
Copy link
Collaborator

There is a small problem with this option as we have 2 log levels:

  • the log level of the LOGFILE logger (which is now debug)
  • the log level of the STDOUT logger (which is now warn)

So I am not sure yet what would this option do. Also do we really want to keep the STDOUT logger ?

@n-peugnet n-peugnet added the feature New feature or request label Jun 15, 2020
@n-peugnet n-peugnet added easy Not too hard to do disscussion This issue needs discussion labels Jun 24, 2020
@n-peugnet
Copy link
Collaborator Author

n-peugnet commented Jun 25, 2020

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

@n-peugnet
Copy link
Collaborator Author

n-peugnet commented Jul 1, 2020

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disscussion This issue needs discussion easy Not too hard to do feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant