

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
3 messages in org.apache.logging.log4j-userRE: ObjectRenders| From | Sent On | Attachments |
|---|---|---|
| Søren Ehrhorn | Jun 3, 2004 4:35 am | |
| Shapira, Yoav | Jun 3, 2004 5:55 am | |
| Søren Ehrhorn | Jun 4, 2004 12:46 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | RE: ObjectRenders | Actions... |
|---|---|---|
| From: | Søren Ehrhorn (soer...@jyskebank.dk) | |
| Date: | Jun 4, 2004 12:46:27 am | |
| List: | org.apache.logging.log4j-user | |
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:Yoav...@mpi.com] 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:soer...@jyskebank.dk] Sent: Thursday, June 03, 2004 7:36 AM To: 'log4...@logging.apache.org' Subject: ObjectRenders
Hi,
Im trying to incorperate ObjectRenders in min J2EE framework, but i dont know howto. Do they replase Layout??
Regards, Søren
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.







