Skip to content

Commit

Permalink
Merge pull request #183 from justqyx/master
Browse files Browse the repository at this point in the history
feat: Logging ssl information of a request
  • Loading branch information
rogerleite authored May 25, 2017
2 parents e671b7a + 6bcd039 commit 2c0a725
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/httpi/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,13 @@ def reset_config!
protected

def log_request(method, request, adapter)
log("HTTPI #{method.to_s.upcase} request to #{request.url.host} (#{adapter})")
log("HTTPI #{request_ssl_info(request)} #{method.to_s.upcase} request to #{request.url.host} (#{adapter})")
end

def request_ssl_info(request)
if request.auth && request.auth.ssl
"#{request.auth.ssl.ssl_version}/#{request.auth.ssl.verify_mode}"
end
end
end
end

0 comments on commit 2c0a725

Please sign in to comment.