简体   繁体   English

如何跟踪 AWS CloudWatch Log Stream 日志?

[英]How do I tail AWS CloudWatch Log Stream logs?

I'm using the CloudWatch logs service to store logs coming from containerized applications, in the other hand I developed a NodeJS script using the AWS SDK to get those logs.我使用 CloudWatch 日志服务来存储来自容器化应用程序的日志,另一方面,我使用 AWS SDK 开发了一个 NodeJS 脚本来获取这些日志。

I'm looking for a way to live tail the logs, not only to send requests and get logs but also to open a stream and get new logs.我正在寻找一种跟踪日志的方法,不仅可以发送请求和获取日志,还可以打开 stream 并获取新日志。

You can do this via the AWS command line, here's an example:您可以通过 AWS 命令行执行此操作,这是一个示例:

$ aws logs tail /my/log/group/name --follow

References:参考:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM