Take http://smile.amazon.com/` for example. It has
- Redirect from
http
tohttps
- Invalid domain cookies
I'm using Jersey as a HTTP client, but because of #1 I'm using it with ApacheConnectorProvider
as default HttpURLConnection
doesn't follow http-to-https redirect.
I want to capture the #2 warnings to SLF4J with logback
so I'm using jul-to-slf4j
bridge.
SLF4JBridgeHandler.removeHandlersForRootLogger();
SLF4JBridgeHandler.install();
It seems to work exactly as I want it to, but documentation strongly suggests using LevelChangePropagator
for performance reasons.
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
<resetJUL>true</resetJUL>
</contextListener>
However, it is now logging way too much.
How can I configure Jersey and/or Apache HttpClient internals to be much less verbose?