logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andres Almiray <aalmi...@yahoo.com>
Subject Feature request: stack trace filtering
Date Mon, 12 Jun 2006 02:34:43 GMT
Hi,

When using Eclipse I discovered a feature that filters
out specific lines of a stack trace when running
tests. I thought that this was a log4j feature but
saddly it is not. 
I work with AOP and other technologies that produce a
*very long* stack trace with many plumbing code in
between and I would really want to see only the
"relevant" error lines from the logic.

I have already coded two appenders (Console and
RollingFile) that take care of filtering specific
lines (using the xml file format) and would like to
contribute them.

Configuration is as simple as:

<appender name="STDOUT"
class="org.kordamp.construct.commons.log.FilteringConsoleAppender">
   <param name="FilterPattern" value="sun.reflect.*"/>
   <param name="FilterPattern"
value="org.springframework.aop.support.*"/>
   <param name="FilterPattern"
value="org.springframework.aop.framework.*"/>
   <param name="FilterPattern" value=".Proxy.*"/>
   <param name="FilterPattern"
value="java.lang.reflect.Method.invoke.*"/>
   <param name="FilterPattern"
value="java.lang.Thread.run.*"/>
   <param name="FilterPattern"
value="java.security.AccessController.*"/>
   <param name="FilterPattern" value="org.mortbay.*"/>
   <param name="FilterPattern"
value="javax.servlet.http.*"/>
   <param name="FilterPattern"
value="junit.framework.*"/>
   <param name="Target" value="System.out" />
   <layout class="org.apache.log4j.PatternLayout">
   <param name="ConversionPattern"
      value="[%d{yyyy-MM-dd HH:mm:ss}] %-6p
[%-20.20c{1}:%4L] %m%n" />
   </layout>
</appender>

Regards.

-------------------------------------------
Ing. Andres Almiray Jaramillo
http://jroller.com/page/aalmiray
--
What goes up, must come down. Ask any system administrator.
There are 10 types of people in the world: Those who understand binary, and those who don't.
To understand recursion, we must first understand recursion.

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¬°gratis! 
Regístrate ya - http://correo.yahoo.com.mx/ 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message