什么是多行的正则表达式模式(logstash)
发布时间:2020-12-14 05:59:46 所属栏目:百科 来源:网络整理
导读:目前我有: multiline { type = "tomcat" pattern = "(^.+Exception: .+)|(^s+at .+)|(^s+... d+ more)|(^s*Caused by:.+)|(---)" what = "previous"} 这是我的日志的一部分: TP-xxxxxxxxxxxxxxxxxxxxxxxx: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx at xxxxxx
目前我有:
multiline { type => "tomcat" pattern => "(^.+Exception: .+)|(^s+at .+)|(^s+... d+ more)|(^s*Caused by:.+)|(---)" what => "previous" } 这是我的日志的一部分: TP-xxxxxxxxxxxxxxxxxxxxxxxx: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx at xxxxxx Caused by: xxxxxxxxx at xxxxxx Caused by: xxxxxxxxx --- The error occurred in xxxxxxxxx. --- The error occurred xxxxxxxxxx. 我的模式在这里不起作用.可能是因为我在最后添加了(—).什么是正确的正则表达式还添加—线? 谢谢 解决方法
您还需要考虑该行上的其他字符:
(^---.*$) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |