PHPackages                             dneey/laravel-cloudwatch - 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. dneey/laravel-cloudwatch

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

dneey/laravel-cloudwatch
========================

Quickly add cloudwatch logging to your laravel application.

v1.1.0(4y ago)966.3k↓51.2%2MITPHPPHP ^7.2.0

Since Sep 9Pushed 4d ago1 watchersCompare

[ Source](https://github.com/dneey/laravel-cloudwatch)[ Packagist](https://packagist.org/packages/dneey/laravel-cloudwatch)[ RSS](/packages/dneey-laravel-cloudwatch/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (1)Versions (9)Used By (0)

AWS CloudWatch Logger for Laravel
=================================

[](#aws-cloudwatch-logger-for-laravel)

[![laravel-cloudwatch](https://private-user-images.githubusercontent.com/20254688/615178361-ab68fbe0-0abe-48f9-b6b1-42b0f1423d36.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5ODM0OTIsIm5iZiI6MTc4Mjk4MzE5MiwicGF0aCI6Ii8yMDI1NDY4OC82MTUxNzgzNjEtYWI2OGZiZTAtMGFiZS00OGY5LWI2YjEtNDJiMGYxNDIzZDM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAyVDA5MDYzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFlZWE2MDg5MzM1MGE0ZGM4NWEyNzUzY2Q1YTBhNWEyZGVjOGM1MWFhZDU0NWVhMzY5ODhjNTY4NzQyYzc2MWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9._KvNnO6ntgkji9M9i5buKpdysT8NdH3XS2NdJmGJuAA)](https://private-user-images.githubusercontent.com/20254688/615178361-ab68fbe0-0abe-48f9-b6b1-42b0f1423d36.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5ODM0OTIsIm5iZiI6MTc4Mjk4MzE5MiwicGF0aCI6Ii8yMDI1NDY4OC82MTUxNzgzNjEtYWI2OGZiZTAtMGFiZS00OGY5LWI2YjEtNDJiMGYxNDIzZDM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAyVDA5MDYzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFlZWE2MDg5MzM1MGE0ZGM4NWEyNzUzY2Q1YTBhNWEyZGVjOGM1MWFhZDU0NWVhMzY5ODhjNTY4NzQyYzc2MWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9._KvNnO6ntgkji9M9i5buKpdysT8NdH3XS2NdJmGJuAA)[![Downloads](https://camo.githubusercontent.com/ea388e1111bde5ff0accaa764ced85d08a2ae59ada8ed80ef19361872d293149/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646e6565792f6c61726176656c2d636c6f75647761746368)](https://camo.githubusercontent.com/ea388e1111bde5ff0accaa764ced85d08a2ae59ada8ed80ef19361872d293149/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646e6565792f6c61726176656c2d636c6f75647761746368)[![Version](https://camo.githubusercontent.com/963c6faf9d822282126cf4e4d47200312578912832ec82664bbc94a2e865e774/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646e6565792f6c61726176656c2d636c6f75647761746368)](https://camo.githubusercontent.com/963c6faf9d822282126cf4e4d47200312578912832ec82664bbc94a2e865e774/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646e6565792f6c61726176656c2d636c6f75647761746368)[![License](https://camo.githubusercontent.com/9793c9ab0f15a43aa244e2cc8cf049d3537406624ba113ee3b0fd9b12faa4fb4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646e6565792f6c61726176656c2d636c6f75647761746368)](https://camo.githubusercontent.com/9793c9ab0f15a43aa244e2cc8cf049d3537406624ba113ee3b0fd9b12faa4fb4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646e6565792f6c61726176656c2d636c6f75647761746368)

Implementation of [maxbanton AWS handler for monolog](https://github.com/maxbanton/cwh) in [Laravel](https://github.com/laravel/laravel).

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

[](#requirements)

- PHP ^7.2.0
- Laravel ^6.0

Features
--------

[](#features)

- Includes incoming request parameters on every log.
- Includes a `requestId` on every log to narrow down search results to a particular request's lifecycle.

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

[](#installation)

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

```
composer require dneey/laravel-cloudwatch
```

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

[](#basic-usage)

Drop this in your application's `.env` file with your correct AWS credentials.

```
LOG_CHANNEL=cloudwatch

AWS_ACCESS_KEY_ID=aws-key
AWS_SECRET_ACCESS_KEY=aws-secret
AWS_DEFAULT_REGION=aws-region
```

That's it!

```
Log::info('You are now logging to cloudwatch');
```

Extra Configurations
--------------------

[](#extra-configurations)

- You can configure your cloudwatch `log group name` and `stream name` in your .env file. If not set, the value of your `APP_NAME` will be used as the log group name and the value of your `APP_NAME` and `APP_ENV` will be used as your log stream name.

```
AWS_CLOUD_WATCH_GROUP_NAME=project-name
AWS_CLOUD_WATCH_STREAM_NAME=project-name-env
```

- Set log level eg. INFO,CRITICAL,DEBUG,API etc.

```
AWS_CLOUD_WATCH_LEVEL=INFO
```

- Set log retention period cloudwatch in days. The default is `14` days.

```
AWS_CLOUD_WATCH_RETENTION_DAYS=14
```

- By default all request params will be logged except passwords and password confirmations. To change this, set `LOG_REQUEST_PARAMS` to false in the .env file.

```
LOG_REQUEST_PARAMS=false
```

- You can ignore any request parameter by adding a `LOG_REQUESTS_EXCEPT` entry to your .env file. The value should contain a comma separated string of fields to exclude from your logs.

```
LOG_REQUESTS_EXCEPT="password, password_confirmation, image"
```

Example
-------

[](#example)

```
Log::info('Awesome! You are now logging to cloudwatch from Laravel.');
```

AWS
---

[](#aws)

For AWS IAM and policy examples, kindly visit [maxbanton AWS handler for monolog.](https://github.com/maxbanton/cwh)

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance65

Regular maintenance activity

Popularity36

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.4% 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 ~100 days

Recently: every ~124 days

Total

6

Last Release

1625d ago

Major Versions

v0.1.x-dev → v1.0.02020-09-14

PHP version history (2 changes)v0.1.0PHP &gt;=7.1.3

v1.0.0PHP ^7.2.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20254688?v=4)[David Nee Y.](/maintainers/dneey)[@dneey](https://github.com/dneey)

---

Top Contributors

[![dneey](https://avatars.githubusercontent.com/u/20254688?v=4)](https://github.com/dneey "dneey (62 commits)")[![edwinkkh](https://avatars.githubusercontent.com/u/14085719?v=4)](https://github.com/edwinkkh "edwinkkh (1 commits)")

---

Tags

aws-cloudwatchcloudwatchlaravellogmaxbanton-aws-handlermonologobservability

### Embed Badge

![Health badge](/badges/dneey-laravel-cloudwatch/health.svg)

```
[![Health](https://phpackages.com/badges/dneey-laravel-cloudwatch/health.svg)](https://phpackages.com/packages/dneey-laravel-cloudwatch)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B11.5k](/packages/psr-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.

45444.2k1](/packages/pressbooks-pressbooks)[open-telemetry/api

API for OpenTelemetry PHP.

1941.5M276](/packages/open-telemetry-api)

PHPackages © 2026

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