plumthedev/php-cloudwatch-logger

A PHP library for logging to AWS Cloudwatch.

v1.0.3 2024-03-10 19:12 UTC

This package is auto-updated.

Last update: 2024-11-10 22:47:56 UTC


README

PHP PhpStorm

example workflow tests coverage

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.