gpt4 book ai didi

java - 网络驱动程序 API : how to disable verbose error messages?

转载 作者:搜寻专家 更新时间:2023-10-31 08:10:31 25 4
gpt4 key购买 nike

运行示例源代码在

http://code.google.com/p/selenium/wiki/GettingStarted

它运行成功,但是 Eclipse 抛出一堆警告消息。我怎样才能禁止它显示?我真正需要的是最后一行 Page title is: Cheese! - 谷歌搜索

17-Aug-2010 12:07:00 AM com.gargoylesoftware.htmlunit.util.StringUtils parseHttpDate
WARNING: Unable to parse date: -1
17-Aug-2010 12:07:00 AM com.gargoylesoftware.htmlunit.util.StringUtils parseHttpDate
WARNING: Unable to parse date: -1
17-Aug-2010 12:07:01 AM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error
WARNING: CSS error: null [1:4686] Error in style rule. Invalid token "*". Was expecting one of: <S>, "}", ";", <IDENT>.
17-Aug-2010 12:07:01 AM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning
WARNING: CSS warning: null [1:4686] Ignoring the following declarations in this rule.
17-Aug-2010 12:07:01 AM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error
WARNING: CSS error: null [1:6505] Error in expression. Invalid token ";". Was expecting one of: <S>, <PLUS>, "-", <HASH>, <STRING>, <URI>, "inherit", <EMS>, <EXS>, <LENGTH_PX>, <LENGTH_CM>, <LENGTH_MM>, <LENGTH_IN>, <LENGTH_PT>, <LENGTH_PC>, <ANGLE_DEG>, <ANGLE_RAD>, <ANGLE_GRAD>, <TIME_MS>, <TIME_S>, <FREQ_HZ>, <FREQ_KHZ>, <DIMENSION>, <PERCENTAGE>, <NUMBER>, <FUNCTION>, <IDENT>.
Page title is: Cheese! - Google Search

最佳答案

zloiadun 给出的答案在这里不起作用,我不得不使用,

Logger logger = Logger.getLogger ("");
logger.setLevel (Level.OFF);

.. 根据需要更改 getLogger( .. ) 和级别。

关于java - 网络驱动程序 API : how to disable verbose error messages?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3500091/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com