plug_hackney_trace v0.1.0 PlugHackneyTrace
A plug to enable hackney_trace in hackney.
To use it, just plug it into the desired module.
plug PlugHackneyTrace, trace: :min
In a Phoenix powered project, you can plug it into a specific action.
plug PlugHackneyTrace when action in [:show]
Logging
You can log the output of hackney_trace or handle it by a custom function. If you
pass an atom for log option, this module will log the contents with Logger module.
plug PlugHackneyTrace, log: :info
Or you can specify the custom function for handle the output of hackney_trace.
plug PlugHackneyTrace, log: fn contents -> ... end
Options
:log- The log level forLoggeror a function which handles contents of traces. Default is:info.:trace- The trace level forhackney_trace. Default is:max.
Link to this section Summary
Link to this section Functions
Link to this function
call(conn, opts)
Callback implementation for Plug.call/2.
Link to this function
init(opts)
Callback implementation for Plug.init/1.