AWS CloudWatch 何时创建新的日志流? [英] When does AWS CloudWatch create new log streams?

查看:34
本文介绍了AWS CloudWatch 何时创建新的日志流?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

AWS CloudWatch 具有日志组和日志流.日志组对我来说似乎很合理:每个产品(例如每个 Lambda 函数、每个 Sagemaker 端点)都有自己的日志组.

AWS CloudWatch has Log Groups and Log streams. A log group seems reasonable to me: Each product (e.g. each Lambda function, each Sagemaker endpoint) has its own log group.

但是还有日志流.AWS CloudWatch 何时创建新的日志流?我可以搜索日志组的所有日志流吗?

But then there are log streams. When does AWS CloudWatch create new log streams? Can I search all log streams of a log group?

推荐答案

来自 AWS Cloudwatch 文档 您可以看到每次日志来自不同的事件源时都会创建一个日志流.对于 Lambda,每个 Lambda 容器是一个流,其中每个容器可能处理多个事件.

From the AWS Cloudwatch documentation you can see that a log stream is created each time the logs come from a different event source. In case of Lambda, it's one stream per Lambda container where each container might process multiple events.

日志流是共享同一来源的日志事件序列.CloudWatch Logs 中每个单独的日志源构成一个单独的日志流.

A log stream is a sequence of log events that share the same source. Each separate source of logs into CloudWatch Logs makes up a separate log stream.

是的,您可以使用 CloudWatch Logs API 搜索日志组的所有日志流.FilterLogEvents 操作允许您搜索日志组.

Yes, you can search all log streams of a log group using the CloudWatch Logs API. The FilterLogEvents action allows you to search through a log group.

这篇关于AWS CloudWatch 何时创建新的日志流?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆