PHP code example of lhduc / laravel-gcp-logging

1. Go to this page and download the library: Download lhduc/laravel-gcp-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/ */

    

lhduc / laravel-gcp-logging example snippets


'channels' => [
    // ...
    'google' => [
        'driver' => 'custom',
        'via' => Lhduc\LaravelGcpLogging\Logging\GoogleLogger::class,
        'level' => env('LOG_LEVEL', 'debug'),
        'project_id' => env('GOOGLE_APPLICATION_PROJECT'),
        'key_file_path' => env('GOOGLE_APPLICATION_CREDENTIALS'),
        'log_name' => env('GOOGLE_APPLICATION_NAME', 'application'),
        'excluded_routes' => [
            'api/health-check',
        ],
    ],
],
bash
php artisan vendor:publish --provider="Lhduc\LaravelGcpLogging\Providers\GoogleLoggingServiceProvider" --tag=config