Class: RestMan::Request::LogRequest
- Inherits:
-
ActiveMethod::Base
- Object
- ActiveMethod::Base
- RestMan::Request::LogRequest
- Defined in:
- lib/restman/request/log_request.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/restman/request/log_request.rb', line 5 def call return unless log out = [] out << "RestMan.#{request.method} #{redacted_url.inspect}" out << payload.short_inspect if payload out << request.processed_headers.to_a.sort.map { |(k, v)| [k.inspect, v.inspect].join("=>") }.join(", ") log << out.join(', ') + "\n" end |