aleph

valerauko 2018-12-01T11:22:56.000400Z

is there a way to debug / dump requests sent by the aleph http client?

valerauko 2018-12-01T11:23:29.001100Z

i'm having some requests mysteriously fail and i'd love to see what headers aleph actually sent

2018-12-01T11:52:15.003300Z

There are couple of request debugging options since the 0.4.7-alpha2 (I'm not actually sure about the version, but it's in the current master for sure). Here are the details https://github.com/ztellman/aleph/pull/401 (cc @kachayev)

valerauko 2018-12-01T12:01:42.004Z

oh so there's no way to do it in earlier versions? i'm on 0.4.6

2018-12-01T12:12:23.006800Z

I'm afraid there is nothing ready to use out of the box, but you can still add Netty's LoggingHandler manually (just like it's done in the PR https://github.com/ztellman/aleph/pull/401/files#diff-e2d1dde5203e0962010d2fb176031b3cR418) using the :pipeline-transform option of the connection pool https://github.com/ztellman/aleph/blob/ef331d14fabb629f94bc46b96af92b0e7d9ec37f/src/aleph/http.clj#L108. Basically you should pass a function which accepts a pipeline as :pipeline-transform, create a LoggingHandler in it, and call (.addFirst pipeline "activity-logger" logger) (just don't forget to return the pipeline itself from the passed function)

valerauko 2018-12-01T12:29:29.007300Z

thanks for the suggestion

valerauko 2018-12-01T12:29:47.007900Z

i managed to get the logging work based on the code you pointed out

valerauko 2018-12-01T12:30:08.008500Z

but since the request in question is over https it's all encrypted

valerauko 2018-12-01T12:30:20.008800Z

is logging possible on one layer higher?

2018-12-01T12:40:04.011100Z

It should be possible using some combination of handlers added to the pipeline, but I don't have an example at hand :( Can you update the Aleph by any chance?

valerauko 2018-12-01T12:40:23.011300Z

yeah i'll try that for now

valerauko 2018-12-01T12:40:38.011700Z

thanks for the help!

2018-12-01T12:41:38.011900Z

np