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 log level mapping for ChromeDriver #8242

Merged

Conversation

bongosway
Copy link
Contributor

@bongosway bongosway commented Apr 25, 2020

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

This will enable setting ChromeDriver log level via ChromeOption.

This removes the need for this line of code System.setProperty("webdriver.chrome.verboseLogging", true)

Set Logging like so:

ChromeOptions options = new ChromeOptions();
options.setLogLevel(ChromeDriverLogLevel.ALL)

Motivation and Context

Fixes #7493
Makes adapting to future w3c spec on logging easy to manage.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@CLAassistant
Copy link

CLAassistant commented Apr 25, 2020

CLA assistant check
All committers have signed the CLA.

@bongosway bongosway force-pushed the feature/log-level-mapping-for-chromeDriver branch from 4cc499a to bcfece4 Compare April 25, 2020 21:40
@bongosway bongosway marked this pull request as draft April 25, 2020 22:49
@bongosway bongosway force-pushed the feature/log-level-mapping-for-chromeDriver branch from 2fa4125 to a65845d Compare April 26, 2020 10:57
@bongosway bongosway marked this pull request as ready for review April 26, 2020 11:02
@bongosway bongosway force-pushed the feature/log-level-mapping-for-chromeDriver branch from 487b76b to 05a8676 Compare April 26, 2020 21:02
@bongosway
Copy link
Contributor Author

bongosway commented Apr 27, 2020

This chromedriver logging page will need updating, how do I go about that?

Thanks.

Copy link
Member

@shs96c shs96c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it's shaping up perfectly. Thank you for doing this. Just a couple of points, and we'll merge and land. :)

delete --verbose property in favour of --log-level
Add check for CHOME_DRIVER_LOG_LEVEL_PROPERTY and have that take precedence if set.
@bongosway bongosway force-pushed the feature/log-level-mapping-for-chromeDriver branch from 05a8676 to f009269 Compare April 29, 2020 14:19
@bongosway bongosway requested a review from shs96c April 29, 2020 14:20
@bongosway
Copy link
Contributor Author

@shs96c requested changes have been made. Kindly review at your convenience.

Many thanks

Copy link
Member

@shs96c shs96c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thank you!

@shs96c shs96c merged commit b7613a0 into SeleniumHQ:master May 9, 2020
@shs96c
Copy link
Member

shs96c commented May 9, 2020

Merged into the tree. Thank you once again!

@bongosway bongosway deleted the feature/log-level-mapping-for-chromeDriver branch May 9, 2020 19:58
titusfortner pushed a commit to titusfortner/selenium that referenced this pull request Aug 13, 2020
Add log level mapping for ChromeDriver. Adds check for `CHOME_DRIVER_LOG_LEVEL_PROPERTY` and have that take precedence if set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add log level mapping for ChromeDriver just like for Firefox
4 participants