Skip to content

Instantly share code, notes, and snippets.

@Jeiwan
Forked from jeremy/gist:1383337
Last active August 29, 2015 14:19
Show Gist options
  • Save Jeiwan/17683182b64626413424 to your computer and use it in GitHub Desktop.
Save Jeiwan/17683182b64626413424 to your computer and use it in GitHub Desktop.
require 'restclient'
# RestClient logs using << which isn't supported by the Rails logger,
# so wrap it up with a little proxy object.
RestClient.log =
Object.new.tap do |proxy|
def proxy.<<(message)
Rails.logger.info message
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment