Disabling HtmlUnit logs


The following information is not very difficult to find.
However, it may help to gain some time (yes, people tend to search on Google first). And I am sure I will need this information, again, one day. So, this is a good reason to put it on this blog.

I have just updated an application that uses HtmlUnit.
One of the things that annoyed me, was the regular logs about runtime errors with the StrictErrorReporter.

Something like:

ERROR (com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter) – > runtimeError…

The application was using the java.util.logging mechanism.
To disable these logs, I updated my loggers.properties.
Here is my logging configuration for HtmlUnit.

org.apache.http.level = INFO
com.gargoylesoftware.htmlunit.level = WARNING
com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter.level = OFF
com.gargoylesoftware.htmlunit.javascript.host.ActiveXObject.level = OFF
com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument.level = OFF
com.gargoylesoftware.htmlunit.html.HtmlScript.level = OFF

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s