Papertrail installation and configurations

I am using a paper-trail for the logging. It is very easy to use. But when I want to configure Nginx logs or whatever the path of the log, I need to re-configure the configuration. I always forget once in a while, so I am writing down this to note myself.

So, here is my note…

The following script will make the syslogs daemon and will sent logs to papertail

# This will setup the papertrail
wget -qO - --header="X-Papertrail-Token: {token}" \ | sudo bash

In order to send application custom logs, you need to install remote_syslog2 and sent it over. To do that create a yml file in /etc/log_files.yml and put the following configuration.

  - /var/log/nginx/*.log
  port: 11218
  protocol: tls
pid_file: /var/run/

To integrate with Slack, you can check out the following link…

Leave a Reply