PHP code example of dneey / laravel-cloudwatch

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

    

dneey / laravel-cloudwatch example snippets


LOG_CHANNEL=cloudwatch

AWS_ACCESS_KEY_ID=aws-key
AWS_SECRET_ACCESS_KEY=aws-secret
AWS_DEFAULT_REGION=aws-region

Log::info('You are now logging to cloudwatch');

AWS_CLOUD_WATCH_GROUP_NAME=project-name
AWS_CLOUD_WATCH_STREAM_NAME=project-name-env

AWS_CLOUD_WATCH_LEVEL=INFO

AWS_CLOUD_WATCH_RETENTION_DAYS=14

LOG_REQUEST_PARAMS=false

LOG_REQUESTS_EXCEPT="password, password_confirmation, image"

Log::info('Awesome! You are now logging to cloudwatch from Laravel.');