如何下载由 ECS 容器创建的日志,使它们看起来像删除 JSON 的老式方法?
How to download logs created by ECS container to make them look the old-fashined way remove JSON?
我的旧应用程序创建了 AWS Cloudwatch 日志捕获的日志
然而,阅读它们被困在里面是很难看的 JSON。我可以得到它们的原始形式吗?
从您最喜欢的软件包存储库(或从 GitHub)安装 jq
(没有依赖地狱的 C++ 应用程序)。
下载日志并用
解析它们
#profile=...
#lgn=...
aws --profile $profile logs get-log-events --log-stream-name
$lsn --log-group-name /$lgn | jq --raw-output '.events[] | .message'
我的旧应用程序创建了 AWS Cloudwatch 日志捕获的日志
然而,阅读它们被困在里面是很难看的 JSON。我可以得到它们的原始形式吗?
从您最喜欢的软件包存储库(或从 GitHub)安装 jq
(没有依赖地狱的 C++ 应用程序)。
下载日志并用
解析它们#profile=...
#lgn=...
aws --profile $profile logs get-log-events --log-stream-name
$lsn --log-group-name /$lgn | jq --raw-output '.events[] | .message'