How to suppress logging in WebDriverMangager for Python?

Viewed 1580

There is a similar question here, but that is for Java.

I wish to suppress the following:

INFO:WDM:====== WebDriver manager ======
INFO:WDM:Current google-chrome version is 88.0.4324
INFO:WDM:Get LATEST driver version for 88.0.4324
INFO:WDM:Driver [C:\Users\user.name\.wdm\drivers\chromedriver\win32\88.0.4324.96\chromedriver.exe] found in cache

Is there a Python solution?

3 Answers

Should be fixed already in 3.5.0 version of webdriver-manager.

Try to set env variable WDM_LOG_LEVEL=0

P.S. please feel free to come on project's GitHub and describe your issue. There have been done much work on disabling default wdm logging, but if you still have a problem - give to author and contributors an example of code you use and they will try to help. https://github.com/SergeyPirogov/webdriver_manager

Seems it has been updated. New method to switch logs off:

import logging
import os

logging.getLogger('WDM').setLevel(logging.NOTSET)
os.environ['WDM_LOG'] = "false"

Python maintains concept to logging similar to Java. So you can alter logger's default settings with ini file or hardcoding. You may choose new log error level ERROR or WARNING - messages with INFO and below will not be stored then

Related