-
Notifications
You must be signed in to change notification settings - Fork 94
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
Fix exception when set-severity receives invalid logging level #3353
Conversation
After this PR, the output changes to: Usage: cylc [control] set-verbosity [OPTIONS] REG LEVEL
Change the logging severity level of a running suite. Only messages at
or above the chosen severity level will be logged; for example, if you
choose WARNING, only warnings and critical messages will be logged.
Arguments:
REG Suite name
LEVEL INFO, NORMAL, WARNING, ERROR, CRITICAL, DEBUG
cylc-set-verbosity: error: Illegal logging level, ubirajara |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Can merge after Travis CI passes. |
CodeCov not happy because this change is lacking a test (and actually never tested!) Do you want to add one? |
Shouldn't be too hard. And I was going to add one but
I was not sure if it would survive #2802 . Said that, I started the IDE to write a quick unit test, but turns out it's not that simple. The tests in I think the only option is a functional test in the |
I'll write a test for you and raise a PR on your branch. |
🙏 thank you!!! |
See kinow#5. |
Merged! Thanks a lot @matthewrmshin ! Now up to Travis |
This is a small change with no associated Issue.
Executing something like
cylc set-verbosity five ubirajara
, you will get:I believe that is because we are trying to log the
severity
value, while the invalid logging level provided by the user was actually inseverity_str
.Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.