{"id":18023117,"url":"https://github.com/rustyconover/cloudwatch-log-redirector","last_synced_at":"2025-09-23T13:53:04.802Z","repository":{"id":257815848,"uuid":"869885247","full_name":"rustyconover/cloudwatch-log-redirector","owner":"rustyconover","description":"CloudWatch Log Redirector","archived":false,"fork":false,"pushed_at":"2025-09-08T05:13:42.000Z","size":129,"stargazers_count":15,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-19T15:29:09.788Z","etag":null,"topics":["cli","cloudwatch","cloudwatch-logs","command-wrapper","logging"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rustyconover.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-09T04:16:07.000Z","updated_at":"2025-05-05T11:10:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"d03cf81e-817e-4dc2-a7e8-5a675aec6590","html_url":"https://github.com/rustyconover/cloudwatch-log-redirector","commit_stats":null,"previous_names":["rustyconover/cloudwatch-log-redirector"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/rustyconover/cloudwatch-log-redirector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustyconover%2Fcloudwatch-log-redirector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustyconover%2Fcloudwatch-log-redirector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustyconover%2Fcloudwatch-log-redirector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustyconover%2Fcloudwatch-log-redirector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rustyconover","download_url":"https://codeload.github.com/rustyconover/cloudwatch-log-redirector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustyconover%2Fcloudwatch-log-redirector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276588236,"owners_count":25668825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","cloudwatch","cloudwatch-logs","command-wrapper","logging"],"created_at":"2024-10-30T07:07:21.785Z","updated_at":"2025-09-23T13:53:04.741Z","avatar_url":"https://github.com/rustyconover.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CloudWatch Log Redirector\n\nWelcome to the **CloudWatch Log Redirector**! This handy command-line tool helps you capture the logs from your applications and redirect them to AWS CloudWatch Logs.\n\n## Why Use CloudWatch Logs?\n\nCloudWatch Logs is a fantastic service for storing application logs, especially in environments like Docker or ECS containers. In these scenarios, local storage is often unavailable, making CloudWatch an ideal solution for log management. However, there are times when you want to capture logs from specific applications running alongside others within the same container or environment. That's where the CloudWatch Log Redirector comes in!\n\n## Features\n\n- **Redirect Logs**: Capture both STDOUT and STDERR from your applications and send them directly to CloudWatch Logs.\n- **Stream Tagging**: Easily identify logs by tagging them with `[STDOUT]` and `[STDERR]`.\n- **Real-Time Monitoring**: Use the `--tee` option to view logs in real time while they are sent to CloudWatch.\n\n## How to Use\n\nGetting started is simple! Here’s how to use the CloudWatch Log Redirector:\n\n```\nUsage: cloudwatch-log-redirector [OPTIONS] \u003cLOG_GROUP_NAME\u003e \u003cLOG_STREAM_NAME\u003e \u003cCOMMAND\u003e [ARGS]...\n\nArguments:\n  \u003cLOG_GROUP_NAME\u003e   The name of the CloudWatch Logs log group.\n  \u003cLOG_STREAM_NAME\u003e  The name of the CloudWatch Logs log stream.\n  \u003cCOMMAND\u003e          The command to execute.\n  [ARGS]...          Additional arguments for the command.\n\nOptions:\n  -t, --tag-stream-names  Tag the stream names with [STDOUT] and [STDERR].\n      --tee               Display output in real time while sending it to CloudWatch Logs.\n  -h, --help              Show this help message.\n  -V, --version           Display the current version of the tool.\n```\n\n### Example Usage\n\nHere’s a quick example of how to use the tool:\n\n```\ncloudwatch-log-redirector \\\n  my-log-group \\\n  my-log-stream \\\n  command arg1 arg2\n```\n\nHere is a very simple that likely isn't very useful.\n\n```\ncloudwatch-log-redirector \\\n  my-log-group \\\n  my-log-stream \\\n  ls -lR\n```\n\n## How It Works\n\nThe CloudWatch Log Redirector is built with **Tokio**, allowing it to efficiently manage subprocesses. When you run a command, the tool does the following:\n\n1. **Starts the Subprocess**: It spawns your command as a subprocess.\n2. **Attaches Pipes**: It connects pipes to capture both STDOUT and STDERR.\n3. **Reads Logs**: Two tasks read from the respective pipes and place the logs into a queue.\n4. **Flushes to CloudWatch**: The queued messages are periodically sent to CloudWatch Logs.\n5. **Exit Code**: When the command completes, the exit code of the redirector matches that of the child process.\n\n## Getting Help\n\nNeed more assistance? Just run:\n\n```bash\ncloudwatch-log-redirector --help\n```\n\nto view the available options and usage instructions.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustyconover%2Fcloudwatch-log-redirector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frustyconover%2Fcloudwatch-log-redirector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustyconover%2Fcloudwatch-log-redirector/lists"}