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

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

pagevamp/laravel-cloudwatch-logs
================================

Laravel Adapter for AWS CloudWatch

v1.1.3(1y ago)1122.7M↑10.9%56[6 issues](https://github.com/pagevamp/laravel-cloudwatch-logs/issues)[10 PRs](https://github.com/pagevamp/laravel-cloudwatch-logs/pulls)MITPHPCI failing

Since Aug 1Pushed 1y ago7 watchersCompare

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

READMEChangelog (8)Dependencies (5)Versions (23)Used By (0)

Logger for Aws Cloud Watch
--------------------------

[](#logger-for-aws-cloud-watch)

### Breaking Change for version 1.0

[](#breaking-change-for-version-10)

When this package started, it started as a listener for log events and would only work with another channel. This package would listen to log events and just add extra log to cloud watch. So, you did not need to add cloudwatch as a `channel`. But after `1.0` it works as a custom driver. So, you MUST add `LOG_CHANNEL` as `cloudwatch` in your logging config for this to work going forward.

### Installation

[](#installation)

```
composer require pagevamp/laravel-cloudwatch-logs

```

### Example

[](#example)

You can use laravel's default `\Log` class to use this

```
\Log::info('user logged in', ['id' => 123, 'name' => 'Naren']);

```

### Usage with AWS Lambda

[](#usage-with-aws-lambda)

Make sure the AWS Lambda template contains an IAM role with enough access. So think about Logs:CreateLogGroup, Logs:DescribeLogGroups, Logs:CreateLogStream, Logs:DescribeLogStream, Logs:PutRetentionPolicy and Logs:PutLogEvents

### Config

[](#config)

Config for logging is defined at `config/logging.php`. Add `cloudwatch` to the `channels` array

```
'channels' =>  [
    'cloudwatch' => [
            'driver' => 'custom',
            'name' => env('CLOUDWATCH_LOG_NAME', ''),
            'region' => env('CLOUDWATCH_LOG_REGION', ''),
            'credentials' => [
                'key' => env('CLOUDWATCH_LOG_KEY', ''),
                'secret' => env('CLOUDWATCH_LOG_SECRET', '')
            ],
            'stream_name' => env('CLOUDWATCH_LOG_STREAM_NAME', 'laravel_app'),
            'retention' => env('CLOUDWATCH_LOG_RETENTION_DAYS', 14),
            'group_name' => env('CLOUDWATCH_LOG_GROUP_NAME', 'laravel_app'),
            'version' => env('CLOUDWATCH_LOG_VERSION', 'latest'),
            'formatter' => \Monolog\Formatter\JsonFormatter::class,
            'batch_size' => env('CLOUDWATCH_LOG_BATCH_SIZE', 10000),
            'via' => \Pagevamp\Logger::class,
        ],
]

```

And set the `LOG_CHANNEL` in your environment variable to `cloudwatch`.

If the role of your AWS EC2 instance has access to Cloudwatch logs, `CLOUDWATCH_LOG_KEY` and `CLOUDWATCH_LOG_SECRET` need not be defined in your `.env` file.

### Contribution

[](#contribution)

I have added a `pre-commit` hook to run `php-cs-fixer` whenever you make a commit. To enable this run `sh hooks.sh`.

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance45

Moderate activity, may be stable

Popularity59

Moderate usage in the ecosystem

Community27

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 62.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 ~135 days

Recently: every ~181 days

Total

19

Last Release

406d ago

Major Versions

0.2.2 → v1.0.12021-07-29

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3628468?v=4)[developernaren](/maintainers/developernaren)[@developernaren](https://github.com/developernaren)

![](https://www.gravatar.com/avatar/16ec0cda1a5e4fdd96690492a23488087e88e1165e22a716eec62da60eddf0a3?d=identicon)[ujwaldhakal](/maintainers/ujwaldhakal)

![](https://avatars.githubusercontent.com/u/1407947?v=4)[sujansh](/maintainers/sujansh)[@sujansh](https://github.com/sujansh)

---

Top Contributors

[![developernaren](https://avatars.githubusercontent.com/u/3628468?v=4)](https://github.com/developernaren "developernaren (33 commits)")[![FoxxMD](https://avatars.githubusercontent.com/u/4663766?v=4)](https://github.com/FoxxMD "FoxxMD (4 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")[![rmundel](https://avatars.githubusercontent.com/u/13142574?v=4)](https://github.com/rmundel "rmundel (2 commits)")[![hungnv-sr](https://avatars.githubusercontent.com/u/25086528?v=4)](https://github.com/hungnv-sr "hungnv-sr (2 commits)")[![priosshrsth](https://avatars.githubusercontent.com/u/30313649?v=4)](https://github.com/priosshrsth "priosshrsth (2 commits)")[![KentarouTakeda](https://avatars.githubusercontent.com/u/4785040?v=4)](https://github.com/KentarouTakeda "KentarouTakeda (2 commits)")[![sujansh](https://avatars.githubusercontent.com/u/1407947?v=4)](https://github.com/sujansh "sujansh (1 commits)")[![jamesbhatta](https://avatars.githubusercontent.com/u/24622175?v=4)](https://github.com/jamesbhatta "jamesbhatta (1 commits)")[![luigel](https://avatars.githubusercontent.com/u/26235960?v=4)](https://github.com/luigel "luigel (1 commits)")[![Martenvanurk](https://avatars.githubusercontent.com/u/747146?v=4)](https://github.com/Martenvanurk "Martenvanurk (1 commits)")[![naveenk87](https://avatars.githubusercontent.com/u/7149360?v=4)](https://github.com/naveenk87 "naveenk87 (1 commits)")[![niekvanderkooy](https://avatars.githubusercontent.com/u/1261369?v=4)](https://github.com/niekvanderkooy "niekvanderkooy (1 commits)")

---

Tags

awsaws-cloudwatchlaravelphp

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[beyondcode/laravel-server-timing

Add Server-Timing header information from within your Laravel apps.

5712.0M1](/packages/beyondcode-laravel-server-timing)[rollbar/rollbar-laravel

Rollbar error monitoring integration for Laravel projects

14110.4M7](/packages/rollbar-rollbar-laravel)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[kitloong/laravel-app-logger

Laravel log for your application

101.2M8](/packages/kitloong-laravel-app-logger)[label84/laravel-auth-log

Log user authentication actions in Laravel.

3654.0k](/packages/label84-laravel-auth-log)

PHPackages © 2026

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