Hi

I am trying to use object renderer. I have created a class that
implements ObjectRenderer and defined it in the configuration file. But
the log file does not show any result. Can anyone tell me why is this
happening??

Configuration file:

log4j.rootLogger= INFO, A1
log4j.appender.A1=org.apache.log4j.RollingFileAppender
log4j.appender.A1.File=abhi1.log
log4j.renderer.TestInfect1=myObjRender
#log4j.renderer.TestInfect1=TestInfect1
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n %l
[%x] %X{myTest}

--------------------------

Renderer class

import org.apache.log4j.or.ObjectRenderer;

public class myObjRender implements ObjectRenderer {

    public String doRender(Object os1){
        System.out.println("+++++++++++++++++++++++++++++++");
        return "====================================";
    }
}

-------------------

Using the above two, if I just put the object name (of type
MyTestInfect1), then it should return "++++++++++" ? Is my assumption
correct???

abhijeet


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

Reply via email to