Can't turn off HtmlUnit logging messages

后端 未结 7 2044
悲哀的现实
悲哀的现实 2020-12-28 08:50

I\'m using HtmlUnit to interact with a web page that interacts with the server via Ajax. Soon after the Ajax code starts, HtmlUnit produces these two log messages:

7条回答
  •  北海茫月
    2020-12-28 09:10

    You can also use:

    org.apache.log4j.Logger.getLogger("com.gargoylesoftware.htmlunit").setLevel(org.apache.log4j.Level.FATAL);
    java.util.logging.Logger.getLogger("com.gargoylesoftware.htmlunit").setLevel(java.util.logging.Level.SEVERE);
    

提交回复
热议问题