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

Enable user configuration of verbosity via log level #114

Open
sadielbartholomew opened this issue Aug 27, 2024 · 1 comment
Open

Enable user configuration of verbosity via log level #114

sadielbartholomew opened this issue Aug 27, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@sadielbartholomew
Copy link
Member

sadielbartholomew commented Aug 27, 2024

We have a logging system set up for CATS, but (based on what I can see from a git grep "log" in the repo root) there is no interface by which a user can change the log level to adapt the verbosity of output using that system. Therefore, given the Python default logging level set (we don't appear to specify otherwise) of 'WARNING', only log messages at 'WARNING', 'ERROR' or 'CRITICAL' level will currently emerge, not anything on 'INFO' or 'DEBUG', though we do include a few log messages under the former category.

We should implement a means to change the verbosity through configuration of the log level. I suggest one of two options for a new CLI argument to control this:

  1. A --verbosity/-v and two-fold -v -v option to move to logging.info and logging.debug level (i.e. messages at that log level and above emerge) instead of the logging.warning default, respectively (-v/--verbose is quite common among routine commands);
  2. --logging N to set the log level to N, either with its integer or string identifier (this is probably a less common interface to control verbosity, but definitely used in some cases e.g. with the ncdump command, and more flexible in a concise way).
@sadielbartholomew sadielbartholomew added the enhancement New feature or request label Aug 27, 2024
@abhidg
Copy link
Contributor

abhidg commented Aug 27, 2024

I like -v and -vv to set info and debug!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants