I'm trying to intercept the logging message to filter
some keyword before forwarding to the destination. I
tested it in a windows environment using RAD6
I add the new <renderer> tag entry to log4j.xml and
put both log4j.dtd and log4j.xml in the
WEB-INF/classes folder but after I re-compile and
bounce the server the doRender method was never get
called.
Am I missing snything? Please help. Thanks.
<renderer renderedClass="java.lang.String"
renderingClass="test.log4j.LogCatcher"/>
I create a new class test.log4j.LogCatcher as follows:
package test.log4j;
import org.apache.log4j.*;
import org.apache.log4j.spi.*;
import org.apache.log4j.or.ObjectRenderer;
public class LogCatcher implements ObjectRenderer {
public String doRender(Object arg0) {
String st = arg0.toString();
System.out.println("LogCatcher doRender **********
log string catched = *" + st + "*");
return st;
}
}
ALWAYS THERE FOR YOU!!!
Naider Chen
EMAIL ME ANYTIME!!!!
____________________________________________________________________________________
Choose the right car based on your needs. Check out Yahoo! Autos new Car
Finder tool.
http://autos.yahoo.com/carfinder/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]