10 June 2015
Papertrail is an awesome log aggregation service we’ve used for long time. There are many ways to send logs to Papertail service, but we found the following solution is the most straightforward and secure for Rails apps like ours.
config.logger = ActiveSupport::TaggedLogging.new(RemoteSyslogLogger.new("localhost", 514, :program => <YOUR_SERVICE_NAME>))
curl https://papertrailapp.com/tools/papertrail-bundle.pem> .ebextensions/papertrail-bundle.pem
- namespace: aws:elasticbeanstalk:application:environment option_name: SYSLOG_HOST value: logs2.papertrailapp.com:xxxx
Basically the solution can be described as: