SolutionNow with Rails 4 it’s a real no-brainer. Let’s solve a task from SO – add alternative logging into file:
Setting Loggly as additional backend is not much harder:
file_logger = Logger.new(Rails.root.join("log/alternative-output.log"))
All you need is to provide object which implements Logger interface for ActiveSupport::Logger.broadcast. In this way, you can add as much logging backends, as you wish.
# using gem 'logglier'
loggly = Logglier.new('https://logs.loggly.com/inputs//tag/ruby', threaded: true)