gpt4 book ai didi

write cloudwatch logs with 'component', 'error' and other fields(使用“组件”、“错误”和其他字段写入cloudwatch日志)

转载 作者:bug小助手 更新时间:2023-10-28 21:00:42 26 4
gpt4 key购买 nike



In the cdk I can define these filters for the logs:

在CDK中,我可以为日志定义以下过滤器:


const pattern = logs.FilterPattern.all(
logs.FilterPattern.stringValue('$.component', '=', 'HttpServer'),
logs.FilterPattern.any(
logs.FilterPattern.booleanValue('$.error', true),
logs.FilterPattern.numberValue('$.latency', '>', 1000),
),
);

(From the docs).
But I don't know how to write logs that have these fields from my lambda function...

(来自文档)。但是我不知道如何从我的lambda函数中编写包含这些字段的日志...


更多回答
优秀答案推荐
更多回答

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com