PHP code example of superchairon / laravel-google-cloud-logging

1. Go to this page and download the library: Download superchairon/laravel-google-cloud-logging library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

superchairon / laravel-google-cloud-logging example snippets


        'stackdriver' => [
            'driver' => 'custom',
            'via' => \SuperChairon\LaravelGoogleCloudLogging\StackdriverDriver::class,
            'logName' => 'my-application-log',
            'labels' => [
                'application' => env('APP_NAME'),
                'environment' => env('APP_ENV'),
                'other labels' => '...',
            ],
            'level' => 'debug',
        ]

   putenv('GOOGLE_CLOUD_PROJECT=project-id');
   putenv('GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json');