From: RBRi <rb...@us...> - 2018-06-30 12:40:47
|
- **status**: open --> pending - **assigned_to**: RBRi - **Comment**: Hi Ganesh, HtmlUnit uses only commons-logging for all the log output. It is up to you to configure commons-logging + log4j correctly. Usually it should be sufficient to do something like ~~~ Logger.getLogger("com.gargoylesoftware.htmlunit").setLevel(Level.OFF); ~~~ Make sure this code gets really executes and the logger is the one from commons-logging. Sometimes other configurations are overwriting your configuration. Sorry i only have this kind of hints for you.... --- ** [feature-requests:#254] Disable HtmlUnit logging** **Status:** pending **Group:** 2.19 **Created:** Thu Jun 14, 2018 04:35 AM UTC by Ganesh Prakash Barshile **Last Updated:** Thu Jun 14, 2018 04:35 AM UTC **Owner:** RBRi **Attachments:** - [Logger.png](https://sourceforge.net/p/htmlunit/feature-requests/254/attachment/Logger.png) (132.4 kB; image/png) We want to disable all logs of htmlunit unit. We tried it using log4j & commons logging but unable to do it. We tried following code:- Logger.getLogger("com.gargoylesoftware.htmlunit").setLevel(Level.OFF); Logger.getLogger("org.apache.commons.httpclient").setLevel(Level.OFF); Logger.getLogger("com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter").setLevel(Level.OFF); Logger.getLogger("com.gargoylesoftware.htmlunit.javascript.host.ActiveXObject").setLevel(Level.OFF);Logger.getLogger("com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument").setLevel(Level.OFF); Logger.getLogger("com.gargoylesoftware.htmlunit.html.HtmlScript").setLevel(Level.OFF); Logger.getLogger("com.gargoylesoftware.htmlunit.javascript.host.WindowProxy").setLevel(Level.OFF); Logger.getLogger("org.apache").setLevel(Level.OFF); Logger.getRootLogger().setLevel(Level.OFF); is there any solution to disable all logs from htmlunit? --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |