reservio / php-laravel-applogs
This package is abandoned and no longer maintained.
No replacement package was suggested.
AppLogs exception handler for Laravel
dev-master
2020-10-23 08:12 UTC
Requires
- php: >=7.4
- guzzlehttp/guzzle: ^6.4|^7.0
- illuminate/support: ^7.0|^8.0
Requires (Dev)
- mockery/mockery: ^1.4
- php-mock/php-mock-phpunit: ^2.6
- phpunit/phpunit: ^9.3
This package is auto-updated.
Last update: 2020-11-19 08:13:56 UTC
README
📦 Installation
composer require reservio/php-laravel-applogs
🔧 Configuration
Provider
This package uses https://laravel.com/docs/7.x/packages#package-discovery so you don't have to configure service provider.
If you are using Lumen, you have to register provider in bootstrap/app.php via $app->register(\AppLogs\AppLogsServiceProvider::class);
Handler
Register in App/Exceptions/Handler.php:
public function report(Throwable $exception)
{
// ...
if (app()->bound('applogs') && $this->shouldReport($exception)) {
app('applogs')->captureException($exception);
}
// ...
}
Environment
Add applogs server information to .env
file.
APPLOGS_URL=https://fake-url/
APPLOGS_KEY=fake-key-xyz
Configuration file
Uses services.applogs
📄 License
This package is open-sourced software licensed under the MIT license