Skip to content

Instantly share code, notes, and snippets.

@johnpmitsch
Created March 20, 2018 16:20
Show Gist options
  • Save johnpmitsch/57055feb8d4e65ebfd2d215466aceee2 to your computer and use it in GitHub Desktop.
Save johnpmitsch/57055feb8d4e65ebfd2d215466aceee2 to your computer and use it in GitHub Desktop.
foreman/katello record external HTTP calls logging
# add http_logger to local gems https://github.com/railsware/http_logger
# then add the following to foreman/config/development.rb
outbound_calls = Logger.new("#{Rails.root}/log/outbound.log")
HttpLogger.logger = outbound_calls
# HttpLogger.ignore = ["example\.com"] (this doesn't work for some reason)
HttpLogger.log_request_body = false # Default: true
HttpLogger.log_response_body = false # Default: true
# You can get the outbound calls by running something like this (in foreman dir)
# tail -f log/outbound.log | grep -v "Response status" | grep -v "myhostname"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment