travoltron / laratrail
A package to log Laravel apps to Papertrail
Requires
- php: ~5.6|~7.0
Requires (Dev)
- phpunit/phpunit: ~4.0||~5.0
- squizlabs/php_codesniffer: ^2.3
This package is not auto-updated.
Last update: 2024-11-16 16:44:16 UTC
README
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
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.