Skip to content

Forcing logger to log requests and responses before retries exhausted #2875

Answered by mullermp
viralpraxis asked this question in Q&A
Discussion options

You must be logged in to vote

Ah, yeah, you're correct. It's wrapped very early in the handler stack here:

def call(context)
context[:logging_started_at] = Time.now
@handler.call(context).tap do |response|
context[:logging_completed_at] = Time.now
log(context.config, response)
end
end

I don't see a good use case to support this in the Log formatter since it doesn't provide much value. Since you're doing this for debug purposes, I think http_wire_trace is what you're looking for, and I would not recommend it in production.

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@viralpraxis
Comment options

@mullermp
Comment options

Answer selected by viralpraxis
@viralpraxis
Comment options

Comment options

You must be logged in to vote
2 replies
@viralpraxis
Comment options

@mullermp
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants