Java Tips

Solution: Unveiling the Wire

Add JVM Settings.

-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
-Dorg.apache.commons.logging.simplelog.showdatetime=true
-Dorg.apache.commons.logging.simplelog.log.org.apache.http=DEBUG
-Dorg.apache.commons.logging.simplelog.log.org.apache.http.wire=ERROR

Output

2015/02/03 19:23:36:495 EST [DEBUG] BasicClientConnectionManager - Get connection for route {s}->https://greenhouse.lotus.com
2015/02/03 19:23:36:831 EST [DEBUG] DefaultClientConnectionOperator - Connecting to greenhouse.lotus.com:443
2015/02/03 19:23:37:099 EST [DEBUG] RequestAddCookies - CookieSpec selected: best-match
2015/02/03 19:23:37:109 EST [DEBUG] RequestAuthCache - Auth cache not set in the context
2015/02/03 19:23:37:110 EST [DEBUG] RequestTargetAuthentication - Target auth state: UNCHALLENGED
2015/02/03 19:23:37:113 EST [DEBUG] RequestProxyAuthentication - Proxy auth state: UNCHALLENGED
2015/02/03 19:23:37:113 EST [DEBUG] DefaultHttpClient - Attempt 1 to execute request
2015/02/03 19:23:37:113 EST [DEBUG] DefaultClientConnection - Sending request: GET /forums/atom/forums HTTP/1.1
2015/02/03 19:23:37:114 EST [DEBUG] headers - >> GET /forums/atom/forums HTTP/1.1
2015/02/03 19:23:37:115 EST [DEBUG] headers - >> Host: greenhouse.lotus.com
2015/02/03 19:23:37:115 EST [DEBUG] headers - >> Connection: Keep-Alive
2015/02/03 19:23:37:115 EST [DEBUG] headers - >> User-Agent: Apache-HttpClient/4.3.3 (java 1.5)
2015/02/03 19:23:37:115 EST [DEBUG] headers - >> Authorization: Basic <<REMOVED>>
2015/02/03 19:23:37:287 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 200 OK
2015/02/03 19:23:37:287 EST [DEBUG] headers - << HTTP/1.1 200 OK
2015/02/03 19:23:37:288 EST [DEBUG] headers - << Date: Wed, 04 Feb 2015 00:14:04 GMT
2015/02/03 19:23:37:288 EST [DEBUG] headers - << X-Powered-By: Servlet/3.0
2015/02/03 19:23:37:288 EST [DEBUG] headers - << X-LConn-Auth: false
2015/02/03 19:23:37:288 EST [DEBUG] headers - << X-UA-Compatible: IE=9,8
2015/02/03 19:23:37:288 EST [DEBUG] headers - << Expires: Wed, 04 Feb 2015 00:14:04 GMT
2015/02/03 19:23:37:288 EST [DEBUG] headers - << Accept: application/atom+xml
2015/02/03 19:23:37:288 EST [DEBUG] headers - << Last-Modified: Wed, 04 Feb 2015/02/03 19:23:37:289 EST [DEBUG] headers - << Cache-Control: private, max-age=0, no-cache=set-cookie
2015/02/03 19:23:37:289 EST [DEBUG] headers - << Vary: User-Agent,Accept-Encoding
2015/02/03 19:23:37:290 EST [DEBUG] headers - << Keep-Alive: timeout=10, max=89
2015/02/03 19:23:37:290 EST [DEBUG] headers - << Connection: Keep-Alive
2015/02/03 19:23:37:290 EST [DEBUG] headers - << Transfer-Encoding: chunked
2015/02/03 19:23:37:290 EST [DEBUG] headers - << Content-Type: application/atom+xml;charset=UTF-8
2015/02/03 19:23:37:290 EST [DEBUG] headers - << Content-Language: en-US
2015/02/03 19:23:37:383 EST [DEBUG] BasicClientConnectionManager - Releasing connection org.apache.http.impl.conn.ManagedClientConnectionImpl@1372ed45
2015/02/03 19:23:37:383 EST [DEBUG] BasicClientConnectionManager - Connection can be kept alive for 10000 MILLISECONDS
+F: my forum
+F: Lotus Greenhouse
+F: test
+F: Connections 5.0 with CR1 and Portal 8.0.0.1 with CF14
+F: StandAloneForum1

For those that need to set the logging values for Apache Tomcat (across the board), add org.apache.http.level = FINEST to the end of the conf\logging.properties file. You need to restart Tomcat, and then look at the catalina.out file.

Debug Tools

Here are a few helpful Tools: