[HtmlUnit] [htmlunit:feature-requests] #254 Disable HtmlUnit logging
RBRi via HtmlUnit-develop <[email protected]>
| Newsgroups | gmane.comp.java.htmlunit.devel |
|---|---|
| Message-ID | </p/htmlunit/feature-requests/254/e0adfe05b1c55370341b4e3aa29416071da3d5c4.feature-requests@htmlunit.p.sourceforge.net> |
- **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 [email protected] 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.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop