wiebekn / dawilog-php
client for dawilog
Installs: 2 318
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^7.1|^8.0
- ext-json: *
- guzzlehttp/guzzle: ~5.3|~6.0|~7.0
- guzzlehttp/psr7: ^1.6|^2.1
- php-http/message: ^1.5
- psr/http-factory: ^1.0
- psr/log: ^1.0
- ramsey/uuid: ^3.7|^4.0
README
install
composer require wiebekn/dawilog-php
add to .env
DAWILOG_DSN=
config/app.php
Dawilog\Laravel\ServiceProvider::class,
app/Exceptions/Handler.php (Laravel 8)
public function register()
{
$this->reportable(function (Throwable $e) {
if (app()->bound('dawilog') && $this->shouldReport($e)) {
app('dawilog')->sendException($e);
}
});
}
app/Exceptions/Handler.php (Laravel 7)
public function report(Throwable $exception)
{
if (app()->bound('dawilog') && $this->shouldReport($exception)) {
app('dawilog')->sendException($exception);
}
parent::report($exception);
}
app/Exceptions/Handler.php (Laravel 5 & 6)
public function report(Exception $exception)
{
if ($this->shouldReport($exception) && app()->bound('dawilog')) {
app('dawilog')->sendException($exception);
}
parent::report($exception);
}
config/dawilog.php
php artisan vendor:publish --provider="Dawilog\Laravel\ServiceProvider" --tag="config"