PackageTrack
Sign in Get early access

maxbanton/cwh

AWS CloudWatch Handler for Monolog library

v3.0.0 16M downloads/mo #1464 most downloaded on Packagist maxbanton/cwh

What this package is like to depend on

Last release 3 months ago

03 May 2026

Ships unpredictably

gaps range from 9 days to 3.5 years

Rarely documented

notes for 2 of 26 stable releases

Nothing withdrawn

no release was ever pulled

10 years old

26 releases · first in 2016

2 releases in the last 12 months

see the full history below

Release timeline

26 releases · Jul 2016 to May 2026
2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 26
  1. v3.0.0 03 May 2026
    Release notes

    Added

    • $createStream constructor argument (10th, default true). Set to false to skip DescribeLogStreams + CreateLogStream when the log stream is provisioned out of band (e.g. via Terraform). Lets users drop the matching IAM permissions.
    • Full type coverage on the constructor and properties (constructor promotion, readonly for immutable state).
    • phpstan (level 8) runs in CI alongside lint and tests.

    Changed

    • Coding standard upgraded from PSR-2 to PSR-12.
    • PHPUnit upgraded to ^10.5 || ^11.0.

    Removed

    • Support for PHP 7.x and 8.0. Minimum PHP is now ^8.1.
    • Support for Monolog 2. Minimum Monolog is now ^3.0.

    Migration

    • Replace any Monolog\Logger::DEBUG (or other level constant) usage with Monolog\Level::Debug. The $level constructor argument continues to accept int|string|Level so string values like 'debug' keep working.
    • Symfony service definitions referencing !php/const Monolog\Logger::WARNING must change to !php/const Monolog\Level::Warning.
    • Subclasses overriding protected function write(array $record): void must update the signature to protected function write(\Monolog\LogRecord $record): void and access fields via ->property instead of ['key'].
    • The constructor parameter order, names, and defaults of the existing 9 arguments are unchanged. Existing Symfony positional arguments: lists and Laravel with/handler_with named-key configs continue to work after the platform upgrades above.
    Open source →
  2. v2.1.0 01 May 2026
    Release notes

    Added

    • Public flush() method for long-lived workers (Laravel queues, Symfony messenger, PHP-FPM with persistent state). The handler's reset() is also overridden to flush, integrating with Symfony ResettableInterface and Laravel Octane's FlushMonologState. (#95, thanks @DrLuke for #102)
    • README section documenting ECS / EC2 IAM Task Role credentials with CredentialProvider::memoize(). (#103)
    • Docker-based local dev environment (make build, make test, make matrix) running against PHP 8.2 / 8.3 / 8.4 / 8.5.
    • CI runs entirely in Docker containers; only actions/checkout and actions/upload-artifact (both official) are used.
    • .gitattributes excludes dev files from the Composer dist tarball; composer require maxbanton/cwh now ships only LICENSE, README.md, composer.json, and src/Handler/CloudWatch.php (~57% smaller).

    Changed

    • EVENT_SIZE_LIMIT raised from 256 KB to 1 MB (1,048,550 bytes) to match the current AWS PutLogEvents quota. Messages between 256 KB and 1 MB are now shipped as a single CloudWatch event instead of split. (#101)

    Removed

    • RPS_LIMIT self-throttle (5 RPS). The library no longer sleeps to artificially cap PutLogEvents calls — the AWS quota is 5,000 TPS per account/region (1000× higher), and the AWS SDK's retry middleware handles real throttling automatically. (#111, #114)
    • sequenceToken tracking. AWS deprecated this parameter in August 2023 — PutLogEvents ignores it server-side and never throws InvalidSequenceTokenException or DataAlreadyAcceptedException anymore. (thanks @a10waveracer for #115)
    • The retry-on-CloudWatchLogsException loop in flushBuffer() (it existed solely to refresh the sequence token, which no longer matters).

    Fixed

    • checkThrottle() had a latent bug — $current->diff($savedTime)->s reads only the seconds component of a DateInterval, misbehaving across minute boundaries. Fixed by removing the method entirely (see "Removed" above).

    Compatibility

    • No breaking public API changes. Adds public flush() and overrides reset() to flush. Existing constructor and method signatures are unchanged; existing ^2.0 pins continue to work without modification.
    • Minimum PHP / Monolog versions unchanged (^7.2 || ^8 / monolog/monolog: ^2.0). CI tests PHP 8.2 – 8.5; no code paths require newer PHP.
    Open source →
  3. v2.0.4 09 Nov 2022

    Nothing published for this version

  4. v2.0.3 07 Nov 2022

    Nothing published for this version

  5. v2.0.2 17 Nov 2020

    Nothing published for this version

  6. v2.0.1 17 Jan 2020

    Nothing published for this version

  7. v2.0.0 06 Jan 2020

    Nothing published for this version

  8. v1.1.14 06 Jan 2020

    Nothing published for this version

  9. v1.1.13 06 Oct 2019

    Nothing published for this version

  10. v1.1.12 11 Sep 2019

    Nothing published for this version

  11. v1.1.11 21 May 2019

    Nothing published for this version

  12. v1.1.10 05 Oct 2018

    Nothing published for this version

  13. v1.1.9 09 May 2018

    Nothing published for this version

  14. v1.1.8 27 Apr 2018

    Nothing published for this version

  15. v1.1.7 17 Apr 2018

    Nothing published for this version

  16. v1.1.6 29 Mar 2018

    Nothing published for this version

  17. v1.1.4 26 Mar 2018

    Nothing published for this version

  18. v1.1.3 02 Oct 2017

    Nothing published for this version

  19. v1.1.2 02 Sep 2017

    Nothing published for this version

  20. v1.1.1 31 Aug 2017

    Nothing published for this version

  21. v0.1.1 29 Aug 2016

    Nothing published for this version

  22. v1.1 31 Aug 2017

    Nothing published for this version

  23. v1.0 04 Mar 2017

    Nothing published for this version

  24. v0.3 22 Nov 2016

    Nothing published for this version

  25. v0.2 09 Nov 2016

    Nothing published for this version

  26. v0.1 03 Jul 2016

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive