We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For non-textual files any logger running w/ an INFO level causes a lot of noise / gibberish. For example, with logging and an AAC file:
11:55:13 | ??X@??libfaac 1.30?;~,?2Sx??2֡?"dI$D??:L??tY}?q????T?J?9�R?~???W?Md?????/?????????~ ...
It doesn't appear to be possible to customize this outside changing the log level to never see request.body / response.body. For example:
request.body
response.body
Current:
logger.info { "< #{response.status}" } logger.debug { "#{stringify_headers(response.headers)}\n\n#{response.body}" }
Proposed:
logger.info { "< #{response.status}" } logger.debug { "#{stringify_headers(response.headers)}" } if response.body.log? logger.debug { "\n\n" } logger.debug { String(response.body) } end
log? might be:
log?
def log? @encoding != Encoding::BINARY end
logger.info { "> #{request.verb.to_s.upcase} #{request.uri}" } logger.debug { "#{stringify_headers(request.headers)}\n\n#{request.body.source}" }
logger.info { "> #{request.verb.to_s.upcase} #{request.uri}" } logger.debug { "#{stringify_headers(request.headers)}" } if request.body.log? logger.debug { "\n\n" } logger.debug { String(response.body) } end
def log? @source.is_a?(String) end
If this is something of interest I'd be happy to look into further.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
For non-textual files any logger running w/ an INFO level causes a lot of noise / gibberish. For example, with logging and an AAC file:
It doesn't appear to be possible to customize this outside changing the log level to never see
request.body
/response.body
. For example:wrap_response
Current:
Proposed:
log?
might be:wrap_request
Current:
Proposed:
log?
might be:If this is something of interest I'd be happy to look into further.
The text was updated successfully, but these errors were encountered: