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

ActiveLibrary

molxno/laravel-cloudwatch-logging
=================================

A Laravel package for integrating with AWS CloudWatch.

v1.0.0(1y ago)112MITPHPPHP &gt;=7.4

Since Feb 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/molxno/laravel-cloudwatch-logging)[ Packagist](https://packagist.org/packages/molxno/laravel-cloudwatch-logging)[ RSS](/packages/molxno-laravel-cloudwatch-logging/feed)WikiDiscussions main Synced today

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

Laravel CloudWatch Logging
==========================

[](#laravel-cloudwatch-logging)

Este paquete permite enviar logs de Laravel a AWS CloudWatch de manera sencilla utilizando el sistema de logging de Laravel.

📦 Instalación
-------------

[](#-instalación)

Puedes instalar el paquete mediante Composer:

```
composer require molxno/laravel-cloudwatch-logging
```

⚙️ Configuración
----------------

[](#️-configuración)

### 1. Agregar el canal de logging

[](#1-agregar-el-canal-de-logging)

Laravel permite configurar los canales de logging en el archivo `config/logging.php`. Agrega el siguiente bloque dentro de la sección `channels`:

```
'channels' => [
    'cloudwatch' => [
            'driver' => 'cloudwatch',
            'key' => env('AWS_ACCESS_KEY_ID'),
            'secret' => env('AWS_SECRET_ACCESS_KEY'),
            'region' => env('AWS_DEFAULT_REGION'),
            'log_group' => env('CLOUDWATCH_LOG_GROUP'),
            'log_stream' => env('CLOUDWATCH_LOG_STREAM'),
        ],
],
```

### 2. Configurar las variables de entorno

[](#2-configurar-las-variables-de-entorno)

Asegúrate de agregar las credenciales de AWS en tu archivo `.env`:

```
LOG_CHANNEL=cloudwatch
AWS_ACCESS_KEY_ID=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-key
AWS_DEFAULT_REGION=us-east-2
CLOUDWATCH_LOG_GROUP=/app/env
CLOUDWATCH_LOG_STREAM=app-stream
```

Si estás utilizando IAM roles en un servidor EC2 o ECS, puedes omitir `AWS_ACCESS_KEY_ID` y `AWS_SECRET_ACCESS_KEY`.

🚀 Uso con Laravel
-----------------

[](#-uso-con-laravel)

Una vez configurado, puedes utilizar el helper `Log` de Laravel para enviar logs a CloudWatch:

```
use Illuminate\Support\Facades\Log;

Log::info('Este es un mensaje informativo en CloudWatch');
Log::error('Este es un mensaje de error en CloudWatch', ['error_code' => 500]);
```

También puedes usar los otros niveles de logging disponibles: `debug`, `warning`, `critical`, etc.

🛠 Solución de problemas
-----------------------

[](#-solución-de-problemas)

Si los logs no se envían a CloudWatch:

1. **Verifica las credenciales de AWS**: Asegúrate de que `AWS_ACCESS_KEY_ID` y `AWS_SECRET_ACCESS_KEY` sean correctos.
2. **Revisa los permisos de IAM**: El usuario debe tener permisos para `logs:PutLogEvents` en el grupo de logs configurado.
3. **Comprueba la región de AWS**: La región en `.env` debe coincidir con la configuración de tu grupo de logs en AWS CloudWatch.
4. **Valida el nombre del grupo y stream de logs**: Asegúrate de que `CLOUDWATCH_LOG_GROUP` y `CLOUDWATCH_LOG_STREAM` sean correctos.
5. **Habilita el modo debug en Laravel**:

    ```
    APP_DEBUG=true
    LOG_LEVEL=debug
    ```

Si el problema persiste, revisa los logs de Laravel en `storage/logs/laravel.log` para más detalles.

📄 Licencia
----------

[](#-licencia)

Este proyecto está bajo la licencia MIT. ¡Siéntete libre de contribuir y mejorar el paquete! 🚀

###  Health Score

26

—

LowBetter than 46% of packages

Maintenance46

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

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

Unknown

Total

1

Last Release

411d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5e9bb027d6e842fb7412ca57b549e9ad573e679c0c6e78f282830a900206797e?d=identicon)[molxno](/maintainers/molxno)

---

Top Contributors

[![MolanoAlternova](https://avatars.githubusercontent.com/u/134947121?v=4)](https://github.com/MolanoAlternova "MolanoAlternova (8 commits)")

---

Tags

aws-cloudwatchcomposer-librarycomposer-packagelaravellaravel-package

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/vapor-core

The kernel and invocation handlers for Laravel Vapor

41311.2M8](/packages/laravel-vapor-core)[akeneo/pim-community-dev

Akeneo PIM, the future of catalog management is open!

1.0k610.8k78](/packages/akeneo-pim-community-dev)[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.

44542.4k1](/packages/pressbooks-pressbooks)

PHPackages © 2026

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