An exception logger for Laravel to log to Google Stackdriver
deferdie/laravel-stackdriver is a Laravel package for an exception logger for laravel to log to google stackdriver.
It currently has 5 GitHub stars and 14.152 downloads on Packagist (latest version v0.0.7).
Install it with composer require deferdie/laravel-stackdriver.
Discover more Laravel packages by deferdie
or browse all Laravel packages to compare alternatives.
Last updated
composer require deferdie/laravel-stackdriver
GCP_PROJECT_ID=YOUR GOOGLE CLOUD PROJECT ID
GCP_LOG_NAME=YOUR LOG NAME <YOUR LARAVEL PROJECT NAME>
GOOGLE_APPLICATION_CREDENTIALS=PATH TO YOUR CREDIENTIAL.JSON FILE
To optain a JSON file containing your credientials, you first need to create a google service account and get a key file from the IAM section.
StackDriverLogger\LaravelStackDriverServiceProvider::class,
use StackDriverLogger\StackDriverLogger;
and finally within the report function
$log = new StackDriverLogger();
$log->log($exception);