Skip to content

Instantly share code, notes, and snippets.

@XORwell
Created October 30, 2013 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save XORwell/7239161 to your computer and use it in GitHub Desktop.
Save XORwell/7239161 to your computer and use it in GitHub Desktop.
# ApplicationController
around_filter :global_request_logging
def global_request_logging
logger.tagged('USERAGENT'){ logger.info "#{request.headers['HTTP_USER_AGENT']}" }
begin
yield
ensure
logger.info "response_status: #{response.status}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment