处理非常糟糕的做法,Jboss5,log4j,未处理的异常,淹没在无用的日志数据中

时间:2015-03-20 16:00:32

标签: java logging jboss log4j jboss5.x

我是一名系统工程师,我有多个JBOSS5实例,以及一系列已部署的战争。我知道log4J.xml文件,程度不错,并将所有日志发送到localhost rsyslog。现在问题是......

基本上代码可能是非常可怕的实践的教科书示例,常规预期情况未处理,并作为WARN / INFO或ERROR发送到log4j ....基本上整个日志变得毫无意义和浪费,我&# 39; m无法让开发人员做任何事情来解决这个问题...他们可能是我未来的时间,但我完全坚持这一堆。

我不再希望接受150MiB的废话转发到集中式日志记录,整个事情甚至使我自己的系统问题难以识别。我知道我在系统级别可以做的一切,实际上非常好,并且做了一切来隔离和减轻后果...但这还不够,我现在可以在Jboss / log4J / Java端做什么?

我无法切断所有日志记录,我至少需要让他们所做的部分不会被记录下来。所以说,如何停止这些......以及这种类型的日志输出的正确名称是什么?

at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:94)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:152)
at org.apache.commons.httpclient.methods.StringRequestEntity.writeRequest(StringRequestEntity.java:146)
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)

无论如何,我可以以某种方式摆脱以at开头的所有行?这是某种调试功能,它们在生产中是否具有这些性质?真?我的意思是,如果我收到错误消息,并且没有at行,我会更舒服。

0 个答案:

没有答案