PHPackages                             quynhnguyenthe/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. quynhnguyenthe/cwh

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

quynhnguyenthe/cwh
==================

AWS CloudWatch Handler for Monolog library

v1.0.0(2y ago)06MITPHPPHP &gt;=8.1

Since Jul 18Pushed 2y ago1 watchersCompare

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

READMEChangelogDependencies (4)Versions (2)Used By (0)

[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)

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

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

[![Actions Status](https://github.com/maxbanton/cwh/workflows/Pipeline/badge.svg)](https://github.com/maxbanton/cwh/actions)[![Coverage Status](https://camo.githubusercontent.com/735a5a48a49b5879fdbef1022f3fcffb911130a8a1fd8b0f7a12b89bc0369ab5/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6d617862616e746f6e2f6377682f6d61737465722e737667)](https://coveralls.io/github/maxbanton/cwh?branch=master)[![License](https://camo.githubusercontent.com/caf149665127a1344675645dbadcfe0f1d85bd0e5c6bf512e3cb25f4eccebcfe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d617862616e746f6e2f6377682e737667)](https://github.com/maxbanton/cwh/blob/master/LICENSE)[![Version](https://camo.githubusercontent.com/c163589555b9d4ce5b8bc3d47dacc0b2829b492ba172e7416cc3bafc99083acc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d617862616e746f6e2f6377682e737667)](https://packagist.org/packages/maxbanton/cwh)[![Downloads](https://camo.githubusercontent.com/35b8819b17c6b455b275bafd4452ccf55585401a6719fd477916d733a8c21df4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d617862616e746f6e2f6377682e737667)](https://packagist.org/packages/maxbanton/cwh/stats)

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 ^7.3
- 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

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

[](#installation)

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

```
$ composer require quynh.nguyenthe/cwh:^2.0
```

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

[](#basic-usage)

```
