计算重复行而不是在log4j2中显示所有重复行? [英] Counting repeating lines instead of displaying all of them in log4j2?

查看:76
本文介绍了计算重复行而不是在log4j2中显示所有重复行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾经看到过这样的日志.不确定是由什么日志框架生成的.

I have seen a log once that looked like this. Not sure what logging framework generated it.

12:34:56 INFO blah
... previous line repeated 23 times
11:22:33 DEBUG blah

这可以用log4j2完成吗?

Can this be done with log4j2?

推荐答案

当前版本Log4j 2.6.2没有此功能.我不确定实现这一点有多容易,但是我绝对建议您在 Log4j 2问题跟踪器.

The current version, Log4j 2.6.2, does not have this capability. I'm not sure how easy it would be to implement this, but I would definitely recommend that you raise a feature request for this on the Log4j 2 issue tracker.

可能已经存在类似的请求来抑制重复的堆栈跟踪,但是我认为您的想法与众不同,需要另外购买一张Jira票.

A similar request may already exist to suppress repeated stack traces, but I think your idea is different enough to warrant a separate Jira ticket.

这篇关于计算重复行而不是在log4j2中显示所有重复行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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