Hello again, So far so good, but i still have a problem. In the manual there is a referense to a configuration file, objectRendering.xml in chapter3 but its not there! I dont know the structure of how its ment to be implementet. I have a configuration file as listet here:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <!-- THIS IS THE WORKSTATION LOG4J CONFIGURATION FILE --> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> <!-- Denne Appender benyttes fra og med DEBUG level og opefter --> <param name="Threshold" value="DEBUG"/> <param name="Target" value="System.out"/> <layout class="dk.jyskebank.j2ee.core.dump.DumpLayout"> <param name="ConversionPattern" value="%d %-5p [%t] %C{2} (%l) - %m\n" /> </layout> </appender> <root> <priority value="debug"></priority> <appender-ref ref="CONSOLE"/> </root> </log4j:configuration> I would like to be able to construct a render for my loggable objects but as im trying to explain i wery bad english, i dont know how and there. Can you help me? Best regards - S�ren -----Original Message----- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 3. juni 2004 14:56 To: Log4J Users List Subject: RE: ObjectRenders Hi, ObjectRenderers do not replace a Layout. They are classes that know how to render objects of a specific class. For example: class A { private int a; public int getA() { return a; } private int b; public int getB() { return b; } } public class ARenderer implements ObjectRenderer { public String doRender(Object o) { if(o == null) { return null; } else if {! (o instanceof A)) { return null; } else { A obj = (A) o; return "Sum = " + (obj.getA() + obj.getB()); } } They are specified in a properties configuration file as follows: log4j.renderer.A = ARenderer Yoav Shapira Millennium Research Informatics >-----Original Message----- >From: S�ren Ehrhorn [mailto:[EMAIL PROTECTED] >Sent: Thursday, June 03, 2004 7:36 AM >To: '[EMAIL PROTECTED]' >Subject: ObjectRenders > >Hi, > >Im trying to incorperate ObjectRenders in min J2EE framework, but i >dont know howto. Do they replase Layout?? > > >Regards, >S�ren > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
