3 messages in org.apache.logging.log4j-userRE: ObjectRenders
FromSent OnAttachments
Søren EhrhornJun 3, 2004 4:35 am 
Shapira, YoavJun 3, 2004 5:55 am 
Søren EhrhornJun 4, 2004 12:46 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:RE: ObjectRendersActions...
From:Shapira, Yoav (Yoav@mpi.com)
Date:Jun 3, 2004 5:55:52 am
List:org.apache.logging.log4j-user

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