logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Avner BenHanoch" <av...@kinor.com>
Subject Re: newbie: how to associate ObjectRenderer with a Logger
Date Wed, 21 May 2003 13:21:58 GMT
thanks.
I can't test it yet, because till now I operated log4j from the code,
without a configuration file.
however, here is an advanced question:

I need to create two log files.  One for users and one for developers (with
more *fields* being logged).
I know how to assign 2 Appenders to my logger.  However, can the 2 appenders
use different ObjectRenders, so same LogEvent will be logged in two ways to
the two appenders.

thanks in advance,
 Avner


----- Original Message -----
From: "Thomas Muller" <ttm@online.no>
To: "Log4J Users List" <log4j-user@jakarta.apache.org>
Sent: Wednesday, May 21, 2003 1:13 PM
Subject: RE: newbie: how to associate ObjectRenderer with a Logger


> Avner,
>
> If memory serves me right ObjectRenderers are "global" for each repository
> and not tied to a particular Logger. If you want to register renderers
> statically in a configuration file, you have to use DOMConfigurator
> (ObjectRenderers are not supported by PropertyConfigurator).
>
> <renderer renderedClass="MyClass" renderingClass="MyClassRenderer" />
>
> Hope this helps.
>
> --
>
> Thomas
>
>
>
> | -----Original Message-----
> | From: Avner BenHanoch [mailto:avner@kinor.com]
> | Sent: 21 May 2003 08:27
> | To: log4j-user@jakarta.apache.org
> | Subject: newbie: how to associate ObjectRenderer with a Logger
> |
> |
> | Hello,
> |
> | This is my first try with log4j.
> | I walked thru the API and found that it has ability to register
> | ObjectRenderer for a certain class that being logged often.
> | However, I didn't find in the API how to attach this ObjectRenderer to
my
> | Logger.  I only saw how to register it in RegisterMap, but what
> | should I do
> | next.
> | How to wire this RegisterMap to my Logger?  The API seemed to be
> | documented
> | in short only.
> |
> | Can someone help me.
> |
> |
> | ---------------------------------------------------------------------
> | To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> | For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> |
> |
>
>
>
> *************************************************************************
> Copyright ERA Technology Ltd. 2003. (www.era.co.uk). All rights reserved.
> The information supplied in this Commercial Communication should be
treated
> in confidence.
> No liability whatsoever is accepted for any loss or damage
> suffered as a result of accessing this message or any attachments.
>
> ________________________________________________________________________
> This email has been scanned for all viruses by the MessageLabs Email
> Security System. For more information on a proactive email security
> service working around the clock, around the globe, visit
> http://www.messagelabs.com
> ________________________________________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message