Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Driver still logs on console even if all settings are set to false #175

Open
chbakouras opened this issue Jul 29, 2016 · 4 comments
Open
Labels

Comments

@chbakouras
Copy link

chbakouras commented Jul 29, 2016

Settings settings = Settings.builder() .logWire(false) .logTrace(false) .logWarnings(false) .timezone(Timezone.AMERICA_NEWYORK).build();

With above settings the driver still logs everything.
I have Spring boot as a dependency.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
Is there a solution for this issue? What i'm doing wrong?

@hollingsworthd
Copy link
Owner

hollingsworthd commented Jul 29, 2016

I think it's something to do with the logging configuration and level in Spring Boot. But you can also try Settings.builder().logger(null)

@hollingsworthd
Copy link
Owner

There may be a bug here. Each instance is backed by a separate JRE process. Maybe the logging config isn't getting passed on if it's being set by system properties.

@chbakouras
Copy link
Author

Settings.builder().logger(null)
Solved the spam of apache http wire! So this solution sets a null logger in jBrowserDriver? It's the right way?

Spring boot uses slf4j and logback-classic.. So there is 2 binds of slf4j, and i can not properly configure it. I had tried to exclude all slf4j dependencies, tried to configure it with spring's configurations:
logging.level.org.apache.commons.logging.simplelog.log.org.apache.http.wire=ERROR and
logging.level.apache.http.wire=ERROR nothing seems to work..

@hollingsworthd
Copy link
Owner

hollingsworthd commented Aug 3, 2016

It's the right way?

For now. It's a workaround. When this issue is closed/fixed ideally you'll be able to use a non-null logger or whatever you want and not be spammed by Apache wire logs.

Another workaround that would be better (to not have extraneous logs generated and ignored which is what's happening now) might be Settings.builder().javaOptions("-Dyour.logging.params=something", "-Danother.logging.param=somethingelse") which passes properties onto the child JRE process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants