Reputation: 202
I am trying to change the console output produced by webdrivermanager-java from https://github.com/bonigarcia/webdrivermanager
I have found several tutorials on how to do that but none of them works for me (or I am missing something).
Here is the current console output: [TestNG-PoolService-2] INFO io.github.bonigarcia.wdm.WebDriverManager - Using chromedriver 91.0.4472.101 (resolved driver for Chrome 91) [TestNG-PoolService-2] INFO io.github.bonigarcia.wdm.WebDriverManager - Exporting webdriver.chrome.driver as ...
I would like to remove it completely so here are the configurations I tested without success:
On another question here on StackOverflow: How to suppress webdriver-manager logs The solution is to add logback.xml to the resources folder - tested it and it does not work for me
On the github readme the author is mentioning how to influence logging so i have tested following config:
java.util.logging.Logger.getLogger("org.apache.hc").setLevel(Level.SEVERE); java.util.logging.Logger.getLogger("org.apache.http").setLevel(Level.SEVERE);
but that does not work either. I am using webdrivermanager version 4.4.3
Upvotes: 0
Views: 1838
Reputation: 11
I found a solution for this in the official documents: https://bonigarcia.dev/webdrivermanager/#troubleshooting
Setting the level of this to ERROR
<logger name="io.github.bonigarcia" level="ERROR" />
made those disappear from the console output.
Upvotes: 0
Reputation: 202
Fixed by adding logback to my project as a maven dependancy and a logback.xml file with logging config:
dependancy:
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
</dependency>
logback.xml:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<logger name="org.apache" level="ERROR" />
<logger name="httpclient" level="ERROR" />
</configuration>
Upvotes: 2