revolution/laravel-logger-cwlogs

This package is abandoned and no longer maintained. No replacement package was suggested.

CloudWatchLogs channel for Laravel Log

1.1.0 2020-03-04 13:46 UTC

This package is auto-updated.

Last update: 2024-05-18 00:57:07 UTC


README

Demo project
https://github.com/kawax/laravel-logger-project

Requirements

  • Laravel >= 6.0
  • PHP >= 7.2

Installation

Composer

composer require revolution/laravel-logger-cwlogs

config/logging.php

    'channels' => [
        'stack' => [
            'driver'   => 'stack',
            'channels' => ['single', 'cwlogs'],
        ],
        
        'cwlogs' => [
            'driver'    => 'custom',
            'via'       => Revolution\Laravel\Logger\CloudWatchLogs\CloudWatchLogger::class,
            'region'    => env('CWLOGS_REGION'),
            'key'       => env('CWLOGS_KEY'),
            'secret'    => env('CWLOGS_SECRET'),
            'group'     => env('CWLOGS_GROUP'),
            'stream'    => env('CWLOGS_STREAM'),
            'retention' => env('CWLOGS_RETENTION', 14),
            'tags'      => [],
            'level'     => 'debug',
        ],
    ]

.env

CWLOGS_REGION=us-east-1
CWLOGS_KEY=your AWS key
CWLOGS_SECRET=your AWS secret
CWLOGS_GROUP=
CWLOGS_STREAM=
CWLOGS_RETENTION=14

LICENSE

MIT