Class: Sinew::Connection::LogFormatter
- Inherits:
-
Faraday::Logging::Formatter
- Object
- Faraday::Logging::Formatter
- Sinew::Connection::LogFormatter
- Defined in:
- lib/sinew/connection/log_formatter.rb
Instance Method Summary collapse
Instance Method Details
#request(env) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/sinew/connection/log_formatter.rb', line 4 def request(env) info('req') do # Only log the initial request, not the redirects return if env[:redirect] msg = apply_filters(env.url.to_s) msg = "#{msg} (#{env.method})" if env.method != :get msg = "#{msg} => #{env.request.proxy.uri}" if env.request.proxy msg end end |
#response(env) ⇒ Object
17 18 19 |
# File 'lib/sinew/connection/log_formatter.rb', line 17 def response(env) # silent end |