sevenlab/laravel-remote-logging

Log errors to a remote server

2.0.0 2023-01-09 14:43 UTC

This package is auto-updated.

Last update: 2024-10-09 19:07:27 UTC


README

Latest Version on Packagist Software License Total Downloads

Remote logging

This Laravel package send the errors or failed jobs occuring in your application to an external server. For example to display these errors or failed jobs on a dashboard like the spatie/dashboard.spatie.be.

For the failed jobs logging we are extending spatie/laravel-failed-job-monitor and overwriting their default Notification class to allow us to send it to your remote server.

Installation

You can install the package via Composer:

composer require sevenlab/laravel-remote-logging

The package will automatically register itself.

You can publish the config files with:

php artisan vendor:publish --provider="SevenLab\RemoteLogging\RemoteLoggingServiceProvider"

And finally you should install the exception handling in the report function in the Exception handler (app/Exceptions/Handler.php).

...

if (app()->bound('remote-logging')) {
    app('remote-logging')->captureException($exception);
}

...

Usage

By default it will send all errors and failed jobs that occur into your application to the remote server specified in the config file.

Credits