AWS cloudwatch 日志 datetime_format 配置将多行合并为一行
我使用 aws cloudwatch 收集 aws ecs farget 任务的日志。
配置如下图所示:
我得到以下日志,它是有线的。一些带有日期时间的行合并在一个日志中。我认为每个以日期时间开头的日志都应该被视为一个日志。
I use aws cloudwatch to collect aws ecs farget task's logs.
The config is in the following pic:
And I get the following logs, it is wired. Some lines with datetime is combined in one log. I think every log starts with datetime should be seen as one single log.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
awslogs-datetime-format
的%L
选项包含不正确的文档。我遇到了同样的问题,然后查看了驱动程序源代码,%L
匹配\.\d{3}
(这里是 源链接)。这意味着该模式已经与模式开头的文字
.
匹配。您可以像这样更改格式并且它会起作用。The
%L
option ofawslogs-datetime-format
has incorrect documentation. I had the same problem and then looked at the driver source code and%L
matches\.\d{3}
(here's a source link).This means the pattern already matches a literal
.
at the start of the pattern. You may change the format like this and it will work.