PHP code example of zipzoft / laravel-log-channels

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

    

zipzoft / laravel-log-channels example snippets


'channels' => [

    // ...

    'elasticsearch' => [
        'driver' => 'custom',
        'via'    => Zipzoft\LogChannels\ElasticsearchDriver::class,
        'index' => 'laravel_app_log',
    ],
],

'channels' => [
    // ...

    'cloudwatch' => [
        'driver' => 'custom',
        'credentials' => [
            'key' => env('AWS_ACCESS_KEY_ID'),
            'secret' => env('AWS_SECRET_ACCESS_KEY'),
        ],
        'group_name' => env('CLOUDWATCH_LOG_GROUP_NAME'),
        'name' => env('CLOUDWATCH_LOG_NAME'),
        'region' => env('AWS_DEFAULT_REGION'),
        'retention' => env('CLOUDWATCH_LOG_RETENTION_DAYS', 14),
        'version' => env('CLOUDWATCH_LOG_VERSION', 'latest'),
        'batch_size' => env('CLOUDWATCH_LOG_BATCH_SIZE', 10000),
        'via' => Zipzoft\LogChannels\CloudwatchLogger::class,
    ];
],

php artisan zipzoft:logger-channel:install elasticsearch
json
{
  "/aws-sdk-php": "~3.0",
    "maxbanton/cwh": "^2.0"
  }
}

php artisan zipzoft:logger-channel:install cloudwatch