Download the PHP package kirubha7/cloudwatch-logs-laravel without Composer
On this page you can find all versions of the php package kirubha7/cloudwatch-logs-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kirubha7/cloudwatch-logs-laravel
More information about kirubha7/cloudwatch-logs-laravel
Files in kirubha7/cloudwatch-logs-laravel
Package cloudwatch-logs-laravel
Short Description Laravel Cloudwatch Logs Package
License MIT
Informations about the package cloudwatch-logs-laravel
AWS CloudWatch Logs for Laravel
Before using this library, it's recommended to get acquainted with the pricing for AWS CloudWatch services.
Please press ★ Star button if you find this library useful.
Disclaimer
This library uses AWS API through AWS PHP SDK, which has limits on concurrent requests. It means that on high concurrent or high load applications it may not work on it's best way. Please consider using another solution such as logging to the stdout and redirecting logs with fluentd.
Requirements
- PHP ^7.2
- aws/aws-sdk-php": "^3.18
- AWS account with proper permissions (see list of permissions below)
Features
- Creating Log Groups
- Creating Log Streams
- Check if Log Groups exists or not
- Check if Log Stream exists or not
- Sending Logs to cloudwatch log stream
- AWS CloudWatch Logs staff lazy loading
- Suitable for web applications and for long-living CLI daemons and workers
Installation
Install the latest version with Composer by running
Basic Usage
To check if Log Group exists
To check if Log Stream exists
To create log group
To craete log stream
AWS IAM needed permissions
if you prefer to use a separate programmatic IAM user (recommended) or want to define a policy, make sure following permissions are included:
CreateLogGroup
aws docsCreateLogStream
aws docsPutLogEvents
aws docsPutRetentionPolicy
aws docsDescribeLogStreams
aws docsDescribeLogGroups
aws docs
When setting the $createGroup
argument to false
, permissions DescribeLogGroups
and CreateLogGroup
can be omitted
AWS IAM Policy full json example
Issues
Feel free to report any issues
Made in India