PHP code example of molxno / laravel-cloudwatch-logging
1. Go to this page and download the library: Download molxno/laravel-cloudwatch-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/ */
molxno / laravel-cloudwatch-logging example snippets
use Illuminate\Support\Facades\Log;
Log::info('Este es un mensaje informativo en CloudWatch');
Log::error('Este es un mensaje de error en CloudWatch', ['error_code' => 500]);
ini
LOG_CHANNEL=cloudwatch
AWS_ACCESS_KEY_ID=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-key
AWS_DEFAULT_REGION=us-east-2
CLOUDWATCH_LOG_GROUP=/app/env
CLOUDWATCH_LOG_STREAM=app-stream
ini
APP_DEBUG=true
LOG_LEVEL=debug
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.