Can't turn off HtmlUnit logging messages

后端 未结 7 2043
悲哀的现实
悲哀的现实 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:15

    Try by writing your own log4j config file, and making htmlunit use it with the java option:

    -Dlog4j.configuration=file:///my/conf/log4j.properties

    Then in your log4j.properties:

    log4j.logger.com.gargoylesoftware.htmlunit=error
    

提交回复
热议问题