Integrating Papertrail in your Laravel 5.5 Application

Looking for an easy and more reliable way to store and view your Laravel Application logs? You’re in the right place. We’re going to be integrating Papertail as log storage for your Laravel application.

1. Setup Papertrail account:

First thing first. Let’s create a Papertrail account! They offer a free tier with 100MB/month and many other pricing options based on your needs.

Once you’re logged in, go to your dashboard and then click the Add Systems.

At the top of the page you will see your custom host and port. Take note on that because we’re going to need them below.

2. Configure Laravel:

In the folder  App/Providers add the provider  PaperTrailServiceProvider.php with the following content:

Open your Laravel config file config/app.php. In the $providers array add the PaperTrailServiceProvider as follow:

Finally add your Papertrail details to your .env  file as follow:

You’re all set, you can start logging using the same Laravel logging levels.