如何使用FirefoxDriver在java中关闭selenium控制台日志记录?

如何使用FirefoxDriver在java中关闭selenium控制台日志记录?,java,eclipse,selenium,selenium-webdriver,Java,Eclipse,Selenium,Selenium Webdriver,我试图在使用selenium web驱动程序时关闭eclipse中的记录器 FirefoxProfile profile = new FirefoxProfile(); profile.setPreference("webdriver.log.driver", "ERROR"); WebDriver driver = new FirefoxDriver(profile); 在运行程序时,我仍然会收到以下调试日志: [DEBUG] 2015-04-10 1

我试图在使用selenium web驱动程序时关闭eclipse中的记录器

    FirefoxProfile profile = new FirefoxProfile();       
    profile.setPreference("webdriver.log.driver", "ERROR");

    WebDriver driver = new FirefoxDriver(profile);
在运行程序时,我仍然会收到以下调试日志:

[DEBUG] 2015-04-10 12:10:39,904
CookieSpec selected: best-match

[DEBUG] 2015-04-10 12:10:39,922
Auth cache not set in the context

[DEBUG] 2015-04-10 12:10:39,925
Connection request: [route: {}->http://127.0.0.1:7056][total kept alive: 0; route allocated: 0 of 2000; total allocated: 0 of 2000]

[DEBUG] 2015-04-10 12:10:39,960
Connection leased: [id: 0][route: {}->http://127.0.0.1:7056][total kept alive: 0; route allocated: 1 of 2000; total allocated: 1 of 2000]

[DEBUG] 2015-04-10 12:10:39,969
Opening connection {}->http://127.0.0.1:7056

有没有办法关闭它们?

在您的情况下,LogType.DRIVER和LogType.CLIENT的级别设置是什么?我没有设置任何级别。。我应该吗?检查一下是什么级别。实际上,默认情况下它不应该是debug。@Stanjer我在哪里检查它?必须将log4j.rootLogger=debug,stdout,R更改为log4j.rootLogger=info,stdout,R