title: How to enable or implement logging for HttpsURLConnection traffic on Android?
body: <p>I need to be able to log (at least) headers and (optionally) body of unencrypted messages sent / received using HttpsURLConnection in my application. This should be similar to <a href="http://hc.apache.org/httpclient-3.x/logging.html" rel="nofollow">this</a>.</p>
  
  <p>Is there a simple way to do it (e.g. set some flags to enable it)?</p>