square/okhttp — pull request #723 by adriancole (2014-04-19 04:08:34+00:00)
Title: Add frame logger for HTTP/2.

While troubleshooting interop between okhttp and netty this week, I found myself often wishing I had a frame logger. Here's one that should be quick at runtime (can test). I'm flexible on form and how it logs. For now, it dumps to j.u.logging like so:

First field is the stream ID, then length, type, and flags. This doesn't go farther than that as it gets complicated fast..
```
Apr 18, 2014 8:29:25 PM com.squareup.okhttp.internal.spdy.Http20Draft10$FrameLogger log
INFO: >> 0x00000003 101 HEADERS END_HEADERS

Apr 18, 2014 8:29:25 PM com.squareup.okhttp.internal.spdy.Http20Draft10$FrameLogger log
INFO: >> 0x00000003 0 DATA END_STREAM

Apr 18, 2014 8:29:25 PM com.squareup.okhttp.internal.spdy.Http20Draft10$FrameLogger log
INFO: << 0x00000000 15 SETTINGS

Apr 18, 2014 8:29:25 PM com.squareup.okhttp.internal.spdy.Http20Draft10$FrameLogger log
INFO: >> 0x00000000 0 SETTINGS ACK

Apr 18, 2014 8:29:25 PM com.squareup.okhttp.internal.spdy.Http20Draft10$FrameLogger log
INFO: << 0x00000000 0 SETTINGS ACK

Apr 18, 2014 8:29:25 PM com.squareup.okhttp.internal.spdy.Http20Draft10$FrameLogger log
INFO: << 0x00000003 22 HEADERS END_HEADERS

Apr 18, 2014 8:29:25 PM com.squareup.okhttp.internal.spdy.Http20Draft10$FrameLogger log
INFO: << 0x00000003 226 DATA END_STREAM

Apr 18, 2014 8:29:25 PM com.squareup.okhttp.internal.spdy.Http20Draft10$FrameLogger log
INFO: >> 0x00000000 8 GOAWAY
```