module LogOverride
This is used to extend a new instance of RestClient::Request and override it's log_request. Override version keeps email/password from getting into the logs.
Public Instance Methods
log_request()
click to toggle source
# File lib/right_api_client/client.rb, line 36 def log_request if RestClient.log out = [] out << "RestClient.#{method} #{url.inspect}" if !payload.nil? if (payload.short_inspect.include? "email") || (payload.short_inspect.include? "password") out << "<hidden credentials>" else out << payload.short_inspect end end out << processed_headers.to_a.sort.map { |(k, v)| [k.inspect, v.inspect].join("=>") }.join(", ") RestClient.log << out.join(', ') + "\n" end end