travoltron/laratrail

A package to log Laravel apps to Papertrail

dev-master / 1.0.x-dev 2018-01-09 05:09 UTC

This package is not auto-updated.

Last update: 2024-11-16 16:44:16 UTC


README

Latest Version on Packagist Software License Total Downloads

Laravel has a brilliant handler for exceptions and reporting, and the Monolog implementation is second to none.

Now, we'll get it piping logs to Papertrail!

Other implementations have you editing your rsyslog.conf file, but that's not always an option of you can't SSH into the server, plus, it turns on the firehose of things that aren't necessarily related to your app.

Installation

Instruction GIF

First, add the Travoltron\Laratrail\LaratrailServiceProvider::class, to config/app.php and you're all set.

Second, call php artisan vendor:migrate to publish the config file.

End of the gif, I highlighted a url that was in the format of logsX.papertrailapp.com:XXXXX

Finally, you'll need these to add to your .env file:

  • PAPERTRAIL_DOMAIN to logsX.papertrailapp.com, replacing X with what returns when you add a log destination. Leave off the port and colon.
  • PAPERTRAIL_PORT to the port of your log destination (that's the part after, but not including :).

Thats all.

For further instructions on logging see the official documentation

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email ben@travoltron.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.