PHPackages                             matecat/cwh - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. matecat/cwh

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

matecat/cwh
===========

AWS CloudWatch Handler for Monolog library

v3.1.5(4mo ago)01.0k↓25%MITPHPPHP &gt;=8.1

Since Jan 13Pushed 4mo agoCompare

[ Source](https://github.com/matecat/cwh)[ Packagist](https://packagist.org/packages/matecat/cwh)[ Docs](https://github.com/phpnexus/cwh)[ RSS](/packages/matecat-cwh/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

AWS CloudWatch Logs Handler for Monolog
=======================================

[](#aws-cloudwatch-logs-handler-for-monolog)

[![Actions Status](https://github.com/phpnexus/cwh/workflows/Pipeline/badge.svg)](https://github.com/phpnexus/cwh/actions)[![Coverage Status](https://camo.githubusercontent.com/747b0c191c0e86682f92309f7df39a20cb49ee8b65988aee917ffe5c3836e549/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f7068706e657875732f6377682f6d61737465722e737667)](https://coveralls.io/github/phpnexus/cwh?branch=master)[![License](https://camo.githubusercontent.com/9ef3215947cffa4ed43e726ec23b228dbf7cb23be16ee0d4548451cd6bcc6bd4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7068706e657875732f6377682e737667)](https://github.com/phpnexus/cwh/blob/master/LICENSE)[![Version](https://camo.githubusercontent.com/e0f5edebda5638429475a29ff5009c284b97c33043c728f80d31338275fc865b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068706e657875732f6377682e737667)](https://packagist.org/packages/phpnexus/cwh)[![Downloads](https://camo.githubusercontent.com/999505888af6fd0af389fa460f24c8ffa3c6c7be69e46414de725486a9788bc9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068706e657875732f6377682e737667)](https://packagist.org/packages/phpnexus/cwh/stats)

***This is a fork and continuation of the original [maxbanton/cwh](https://github.com/maxbanton/cwh) repository.***

Handler for PHP logging library [Monolog](https://github.com/Seldaek/monolog) for sending log entries to [AWS CloudWatch Logs](http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html) service.

Before using this library, it's recommended to get acquainted with the [pricing](https://aws.amazon.com/en/cloudwatch/pricing/) for AWS CloudWatch services.

Please press **★ Star** button if you find this library useful.

Disclaimer
----------

[](#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
------------

[](#requirements)

- PHP &gt;=8.1
- AWS account with proper permissions (see list of permissions below)

Features
--------

[](#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
- **New!** Configurable rate limit, useful with small batch sizes on long-living CLI daemons and workers

Installation
------------

[](#installation)

Install the latest version with [Composer](https://getcomposer.org/) by running

```
$ composer require phpnexus/cwh:^3.0
```

Basic Usage
-----------

[](#basic-usage)

```
