Instead of writing new appenders it would probably be better to write
a new layout.  Then it could be used with every appender.

On 6/11/06, Andres Almiray <[EMAIL PROTECTED]> wrote:
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to