is there a way to debug / dump requests sent by the aleph http client?
i'm having some requests mysteriously fail and i'd love to see what headers aleph actually sent
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)
oh so there's no way to do it in earlier versions? i'm on 0.4.6
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)
thanks for the suggestion
i managed to get the logging work based on the code you pointed out
but since the request in question is over https it's all encrypted
is logging possible on one layer higher?
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?
yeah i'll try that for now
thanks for the help!
np