I've figured this one out but looking through the message archive. I've added the following lines to the log4j-config.xml:
<renderer renderedClass="fully.qualified.class.typeToBeRendered" renderingClass="fully.qualified.custom.object.renderer"/> Adding the above seemed to solve my problems. -----Original Message----- From: Ceki Gülcü [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2002 5:49 PM To: Log4J Users List Subject: Re: ObjectRender Search for ObjectRenderer in http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigurat or.html The same but a little quicker: http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigurat or.html#doConfigure(java.lang.String,%20org.apache.log4j.spi.LoggerRepositor y) At 17:32 24.05.2002 -0400, you wrote: >Matt, > >I posted the same question on May 16th. So far there has been no reply >but this worked for me: > >((Hierarchy)log.getLoggerRepository()).addRenderer(MyClass.class, new >MyRenderer()); > >Surely there must be a better way - maybe in a properties file. > > >----- Original Message ----- >From: "Matt Cox" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Wednesday, May 22, 2002 12:05 PM >Subject: ObjectRender > > > > Hi, > > > > I'm using 1.2.1 and I would like to implement my own custom >ObjectRenderers. > > It looks pretty straight forward in terms of implementing the >ObjectRenderer > > Class. But after that I need some direction. I'm assuming that I >need to > > add my implementation to the RendererMap for a given class type, but >how do > > I get the RendererMap? > > > > In the javadoc there is a method on Logger to get the hierarchy from >which I > > can get the RendererMap but this has been deprecated, with a reference >to > > use LogManager.getLoggerRepository(). But there is nothing on the > > repository to allow me to get the RendererMap. > > > > What am I missing? > > > > Thanks, > > Matt > > > > -- > > To unsubscribe, e-mail: ><mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> > > > > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- Ceki -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>