I am building an erlang application and making use of lager — a logging framework written by Basho technologies.
I would like to send logging output to Papertrail, or failing that Loggly.
Can anyone give me some guidance as to how to configure this?
I was about to suggest using a
lager
syslog
adapter, and configuring that to talk to the syslog input of Papertrail or Loggly, but the Basho syslog adapter only logs to localhost.However, all is not lost, you can configure the lager syslog adapter to log using a known facility to syslog-ng or rsyslog on the same machine, and have that syslog daemon send the logs to Papertrail. Papertrail has a syslog configuration guide that will tell you how to configure the syslog server.
I would suggest using a facility of
local0
or something in the lager syslog adapter, then configure rsylog like this:The
syslog-ng
config is more involved: