wndr/laravel-cloudwatch-tail 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wndr/laravel-cloudwatch-tail

最新稳定版本:1.0.0

Composer 安装命令:

composer require wndr/laravel-cloudwatch-tail

包简介

Tail Laravel log files and ship them to AWS CloudWatch Logs

README 文档

README

Tail Laravel log files and ship them to AWS CloudWatch Logs.

Installation

composer require wndr/laravel-cloudwatch-tail

Configuration

Publish the configuration file:

php artisan vendor:publish --tag=cloudwatch-tail-config

Environment Variables

Configure the following environment variables:

CLOUDWATCH_LOG_GROUP_NAME=your-log-group-name
CLOUDWATCH_LOG_REGION=eu-west-1
CLOUDWATCH_LOG_KEY=your-aws-key
CLOUDWATCH_LOG_SECRET=your-aws-secret

If CLOUDWATCH_LOG_KEY and CLOUDWATCH_LOG_SECRET are not set, the AWS SDK will use the default credential provider chain (IAM roles, environment variables, etc.).

Usage

Run the command to start shipping logs:

php artisan cloudwatch:ship-logs

Options

Option Default Description
--dir storage/logs Directory to watch for log files
--pattern *.log File pattern to match
--group Config value CloudWatch Log Group name
--cursor cloudwatch-cursors.json Cursor file (only used when cleanup is disabled)
--flush-seconds 60 Flush interval in seconds
--max-bytes 900000 Max batch bytes per stream before flush
--refresh-seconds 120 How often to rescan directory for new files
--sleep-ms 200 Loop sleep when idle (milliseconds)
--cleanup-after-ship true Truncate shipped files and delete old rotated logs

License

MIT

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-19