-
- Notifications
You must be signed in to change notification settings - Fork 8.6k
[grid] Silent fail on invalid log level #15796
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
Conversation
Fixing issue where providing an invalid log level to Grid will fail silently. Since the logger is not yet configured a stacktrace with the exception is printed to console and we continue since the default log level is already configured. Fixes SeleniumHQ#15790
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
| |||||||||
| @Oxilod Can you run the formatter against your branch to fix the CI failure?
|
Adding link to logging levels as suggested by @diemol and formatting.
| @cgoldberg Sorry for the formatting issue. I've fixed it by running the script and pushed the changes. |
Adding hardcoded log levels as suggested by review.
| Thank you, @Oxilod! |
User description
🔗 Related Issues
Fixes #15790
💥 What does this PR do?
Fixing issue where providing an invalid log level to Grid will fail silently.
🔧 Implementation Notes
Since the logger is not yet configured a stacktrace with the exception is printed to console and we continue since the default log level is already configured.
I've considered percolating the exception up to the TemplateGrid.java, configure() method and doing a try catch there but to me it's unnecessarily complicated.
🔄 Types of changes
PR Type
Bug fix
Description
Print stacktrace when invalid log level is provided
Prevent silent failure by notifying via console output
Default log level is used if invalid value is given
Changes walkthrough 📝
LoggingOptions.java
Handle invalid log level with stacktrace and fallbackjava/src/org/openqa/selenium/grid/log/LoggingOptions.java