PHPackages                             legalthings/cloudwatch-logger-php - 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. legalthings/cloudwatch-logger-php

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

legalthings/cloudwatch-logger-php
=================================

CloudWatch logger for PHP

0.1.3(8y ago)934.9k↓32.9%3MITPHPPHP &gt;=5.5.0

Since Aug 8Pushed 8y ago8 watchersCompare

[ Source](https://github.com/legalthings/cloudwatch-logger-php)[ Packagist](https://packagist.org/packages/legalthings/cloudwatch-logger-php)[ RSS](/packages/legalthings-cloudwatch-logger-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (5)Used By (0)

Legal Things - CloudWatch Logger PHP
====================================

[](#legal-things---cloudwatch-logger-php)

This library provides you with a simplified interface to log data to AWS CloudWatch.

Requirements
------------

[](#requirements)

- [PHP](http://www.php.net) &gt;= 5.5.0

*Required PHP extensions are marked by composer*

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

[](#installation)

The library can be installed using composer.

```
composer require legalthings/cloudwatch-logger-php

```

Output
------

[](#output)

[![output](https://user-images.githubusercontent.com/5793511/29072119-c16b1ce2-7c46-11e7-87e1-bde855aa279e.png)](https://user-images.githubusercontent.com/5793511/29072119-c16b1ce2-7c46-11e7-87e1-bde855aa279e.png)

Usage
-----

[](#usage)

```
use LegalThings/CloudWatchLogger;

$config = [
    'aws' => [
        'version' => 'latest',
        'region' => 'eu-west-1',
        'credentials' => [
            'key' => 'my_key',
            'secret' => 'my_secret'
        ]
    ],
    'group_name' => 'group_name',
    'stream_name' => 'stream_name'
];

$logger = new CloudWatchLogger($config);

$logger->log(['hello' => 'world']);
/*
  outputs within the group 'group_name' and instance 'stream_name' on CloudWatch:

   {
      "hello": "world"
   }
*/
```

Configuration
-------------

[](#configuration)

```
[
    // required
    'aws' => [
        // required
        'version' => 'latest',

        // required
        'region' => 'eu-west-1',

        // optional, credentials may be omitted if using aws environment variables or roles
        'credentials' => [
            'key' => 'my_key',
            'secret' => 'my_secret'
        ]
    ],

    // required
    'group_name' => 'group_name',

    // required
    'stream_name' => 'stream_name',

    // optional
    'options' => [
        // defaults to infinite
        'retention_days' => 7,

        // retry logging when receiving error (invalid token sequence exception), defaults to 5
        'error_max_retry' => 3,

        // delay to wait for before retrying logging in microseconds, defaults to 100000 microseconds (0.1 seconds)
        'error_retry_delay' => 0
    ]
]
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

3

Last Release

3199d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fb23c3d3e3cfed7ef09c08be522314ed8f4aee9d25c0674ca3b0be7895182f8f?d=identicon)[svenstam](/maintainers/svenstam)

---

Top Contributors

[![moesjarraf](https://avatars.githubusercontent.com/u/5793511?v=4)](https://github.com/moesjarraf "moesjarraf (5 commits)")[![svenstm](https://avatars.githubusercontent.com/u/1632578?v=4)](https://github.com/svenstm "svenstm (1 commits)")

### Embed Badge

![Health badge](/badges/legalthings-cloudwatch-logger-php/health.svg)

```
[![Health](https://phpackages.com/badges/legalthings-cloudwatch-logger-php/health.svg)](https://phpackages.com/packages/legalthings-cloudwatch-logger-php)
```

###  Alternatives

[symfony/monolog-bridge

Provides integration for Monolog with various Symfony components

2.6k189.7M258](/packages/symfony-monolog-bridge)[rollbar/rollbar

Monitors errors and exceptions and reports them to Rollbar

33723.7M82](/packages/rollbar-rollbar)[illuminate/log

The Illuminate Log package.

6224.3M518](/packages/illuminate-log)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[graycore/magento2-stdlogging

A Magento 2 module that changes all logging handlers to stdout

2382.6k](/packages/graycore-magento2-stdlogging)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
