plumthedev / php-cloudwatch-logger
A PHP library for logging to AWS Cloudwatch.
Requires
- php: ^8.1
- aws/aws-sdk-php: ^3
- phpnexus/cwh: ^3.1
- psr/container: ^2.0
- webmozart/assert: ^1.11
Requires (Dev)
- mockery/mockery: ^1.6
- phpstan/phpstan: ^1.10
- phpstan/phpstan-mockery: ^1.1
- phpunit/phpunit: ^10
- roave/security-advisories: dev-latest
- slevomat/coding-standard: ^8.14
This package is auto-updated.
Last update: 2024-11-10 22:47:56 UTC
README
Introduction
PHP Cloudwatch Logger is a PHP library designed for logging to the AWS Cloudwatch service. It offers a seamless way to track various types of information from your PHP application directly to AWS Cloudwatch.
Installation
composer require plumthedev/php-cloudwatch-logger
Usage
To instantiate a Monolog logger, utilize the CloudwatchLoggerFactory::createCloudwatchLogger
method.
This method initializes a new logger instance, requiring the complete configuration during logger creation.
@see LoggerFactory::createCloudwatchLogger
Testing
To run tests, you need to build a Docker image first:
make build
Only then you can execute the tests:
make test
Contribution
If you spot areas for improvement, wish to make enhancements, or have ideas for further development, feel free to contribute to this project.
To access the project terminal, you must first build the Docker image:
make build
Afterward, you can enter the console:
make run
Before submitting a pull request, ensure everything is in order:
make check
License
This project is licensed under the terms of the MIT license. See the LICENSE file for details.