webdrivermanager icon indicating copy to clipboard operation
webdrivermanager copied to clipboard

Enhancement: Disable the org.apache.http.wire/httpclient DEBUG log

Open AlexanderPoleschuk opened this issue 8 years ago • 7 comments

Using WebDriverManager each time I start the test, I have to observe tons of DEBUG/INFO messages from org.apache.http.wire in the console, which drives me nuts!

Currently the issue is "solved" by adding logback.xml file to resources folder with following:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <logger name="org.apache" level="ERROR" />
    <logger name="httpclient" level="ERROR" />
</configuration>

This fixes the issue, but seems like a crutch the we should use on our own..

It would be really nice to find a solution to supress all logging DEBUG/INFO message from org.apache.http.wire protocol out of the WebDriverManager box.

AlexanderPoleschuk avatar Apr 30 '18 10:04 AlexanderPoleschuk

@AlexanderPoleschuk It isn't an issue. You should control logs level on your side via custom configuration. Library provide httpclient by logs by default because of it's use it.

rosolko avatar Apr 30 '18 19:04 rosolko

@rosolko You are right, it's not an issue. That's why I've marked it as an enhancement, right?)

But for the user that wasn't using httpclient before, it comes as a "surprise", when he sees tons of debug messages in console. And believe me, people are really annoyed by this and in some cases decline using WebDriverManager cause of this "feature". The "solution" that I've added above might not be optimal, as it supresses all output for org.apache/httpclient except errors. But if this is considered as a real solution - it would be nice to update the documentation for WebDriverManager and describe how this output might be supressed.

AlexanderPoleschuk avatar May 02 '18 09:05 AlexanderPoleschuk

@AlexanderPoleschuk Thanks for sharing info. The debug logs are really annoying. I have downgraded webdriver manager but now with your solution, I am able to use the latest version. Thanks a lot.

@webdriver manager team please improve it so the end user will have less hassle. Thanks for creating a wonderful tool.

sukhjinder-sdei avatar May 03 '18 11:05 sukhjinder-sdei

Do we need to put the logback.xml in the resource folder in which we are using the webdriver-manager library? Basically I want to understand what should be the directory structure.

deepak-suyal avatar May 11 '18 09:05 deepak-suyal

I have written entire code in src/test/java So I have kept logback.xml inside src/test/resources.

sukhjinder-sdei avatar May 11 '18 09:05 sukhjinder-sdei

@sukhjinder-sdei Thanks for the information, that helped me out.

@AlexanderPoleschuk Thanks for sharing the details, the logback.xml helped me getting rid of the unwanted logs.

deepak-suyal avatar May 11 '18 09:05 deepak-suyal

For the best of my knowledge, this problem can only be solved changing properly the logging configuration, as already discussed in other posts (here or here).

In any case, I have just added some information about this in the README page.

bonigarcia avatar May 13 '18 17:05 bonigarcia