My primary issue is that I face SSL handshake timed out error in few of my requests, But it doesn't happen frequently. So, I am trying to get more detailed logs of the entire process. I have already referred to this answer in a similar question but I am still unable to see anything in the Logcat. possibly because of the legacy version? I am trying to avoid the need to change or update the library.
This is what I have tried so far
java.util.logging.Logger.getLogger("httpclient.wire.header").setLevel(java.util.logging.Level.FINEST);
java.util.logging.Logger.getLogger("httpclient.wire.content").setLevel(java.util.logging.Level.FINEST);
System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true");
System.setProperty("org.apache.commons.logging.simplelog.log.httpclient.wire", "debug");
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http", "debug");
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.header", "debug");
System.setProperty("org.apache.http.client.HttpClient", "debug");
and ran these in adb
adb shell setprop log.tag.org.apache.http VERBOSE
adb shell setprop log.tag.org.apache.http.wire VERBOSE
adb shell setprop log.tag.org.apache.http.headers VERBOSE
I have also read somewhere that logging needs to be set at both java level and android level. How do I do that?
Any help/advice is appreciated.