Closed php-coder closed 4 years ago
An update in case it can be helpful to someone else:
The loglevel is set and managed by Maven. Here is the details: https://maven.apache.org/maven-logging.html It uses slf4j and SimpleLogger by default. In order to suppress annoying htmlunit messages, I passed the following options:
-Dorg.slf4j.simpleLogger.log.com.gargoylesoftware.htmlunit.DefaultCssErrorHandler=error
-Dorg.slf4j.simpleLogger.log.com.gargoylesoftware.htmlunit.html.InputElementFactory=warn
-Dorg.slf4j.simpleLogger.log.com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl=error
In order to use them always and by default, I put these lines into .m2/jvm.config
file within a project.
I didn't found how to turn off htmlunit logging. At this moment it produces a lot of noise:
I have
src/test/resources/logback-test.xml
file where these messages are turned off but htmlunit doesn't use this file.How to manage logging for htmlunit in this case?