如何使用 Cloudformation 为 API 网关启用 Cloudwatch 日志? [英] How to enable Cloudwatch Logs for API Gateway using Cloudformation?

查看:25
本文介绍了如何使用 Cloudformation 为 API 网关启用 Cloudwatch 日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在尝试使用 Cloudformation 在 API Gateway 中启用 Cloudwatch 日志.但是,我没有找到这样做的文档.我能找到的只是官方文档中的 Logginglevel ,这似乎不是解决方案.

Hi I'm trying to enable Cloudwatch logs in API Gateway using Cloudformation. However, I do not find the the documentation to do so. All I can find is Logginglevel in the official documentation which doesn't seem to be the solution.

对于上下文,我希望使用 Cloudformation 来实现这一点,但不知道如何实现.请帮忙.

For context I'm looking to achieve this using Cloudformation but don't know how to. Please help.

推荐答案

这些日志设置是使用 方法设置:

These log settings are set using MethodSetting:

  • DataTraceEnabled - 用于记录完整请求..."
  • LoggingLevel 用于日志级别"
  • MetricsEnabled 用于启用详细的 CloudWatch 指标"
  • DataTraceEnabled - is for "Log full requests..."
  • LoggingLevel is for "Log level"
  • MetricsEnabled is for "Enable detailed CloudWatch metrics"

这篇关于如何使用 Cloudformation 为 API 网关启用 Cloudwatch 日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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