aporat/laravel-cloudwatch-logger
最新稳定版本:v2.0.0
Composer 安装命令:
composer require aporat/laravel-cloudwatch-logger
包简介
A Laravel logging driver for AWS CloudWatch Logs integration
README 文档
README
A Laravel logging driver for seamless integration with AWS CloudWatch Logs.
Features
- Custom Monolog channel for sending logs to CloudWatch.
- Configurable AWS credentials, log group, stream, retention, and batch size.
- Supports string-based, class-based, and callable custom log formatters.
- Fully compatible with Laravel's
Logfacade and channel system. - Simple, environment-based setup with a dedicated configuration file.
Requirements
- PHP:
^8.4 - Laravel:
^10.0||^11.0||^12.0 - AWS SDK: Provided via
phpnexus/cwh
Installation
-
Require the package via Composer:
composer require aporat/laravel-cloudwatch-logger
-
Publish the configuration file:
php artisan vendor:publish --provider="Aporat\CloudWatchLogger\CloudWatchLoggerServiceProvider" --tag="config"
This will create a
config/cloudwatch-logger.phpfile in your application.
Configuration
Step 1: Add the CloudWatch Channel
Add the following channel definition to your config/logging.php file's channels array. This will use the configuration file you published in the previous step.
'channels' => [ // ... other channels 'cloudwatch' => require config_path('cloudwatch-logger.php'), ],
统计信息
- 总下载量: 2.89k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-06