Download the PHP package maxbanton/cwh without Composer
On this page you can find all versions of the php package maxbanton/cwh. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download maxbanton/cwh
More information about maxbanton/cwh
Files in maxbanton/cwh
Package cwh
Short Description AWS CloudWatch Handler for Monolog library
License MIT
Homepage https://github.com/maxbanton/cwh
Informations about the package cwh
AWS CloudWatch Logs Handler for Monolog
Handler for PHP logging library Monolog for sending log entries to AWS CloudWatch Logs service.
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.3
- AWS account with proper permissions (see list of permissions below)
Features
- Up to 10000 batch logs sending in order to avoid Rate exceeded errors
- Log Groups creating with tags
- 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
Frameworks integration
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
Contributing
Please check this document
Made in Ukraine πΊπ¦