Selenium chromedriver disable logging or redirect it java

前端 未结 2 528
臣服心动
臣服心动 2021-01-13 02:47

I am trying to use selenium in a mini web crawler to get the page source. My output log is invaded by selenium logs, is there a way to totally disable the logging or just re

2条回答
  •  终归单人心
    2021-01-13 03:33

    Ok i have managed to finally get rid of that useless loggings. Here is what i did.
    Use:
    System.setProperty("webdriver.chrome.silentOutput", "true");

    To get rid of chromedriver logs:

    Starting ChromeDriver 2.43.600233 (523efee95e3d68b8719b3a1c83051aa63aa6b10d) on port 1628 Only local connections are allowed.


    And use: java.util.logging.Logger.getLogger("org.openqa.selenium").setLevel(Level.OFF);
    To get rid of selenium logs:

    ott 24, 2018 7:52:01 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFORMAZIONI: Detected dialect: OSS

提交回复
热议问题