One other thing: if we don't plumb repository properties to loggingevent MDC, 
we should remove the properties code in logger RepositoryEx

I do think an argument could be made in support of keeping repository-wide 
properties (determining source of an event once the events have been combined 
(db, network receiver).


Scott Deboy
COMOTIV SYSTEMS
111 SW Columbia Street Ste. 950
Portland, OR  97201

Telephone:      503.224.7496
Cell:           503.997.1367
Fax:            503.222.0185

[EMAIL PROTECTED]

www.comotivsystems.com



-----Original Message-----
From: Curt Arnold [mailto:[EMAIL PROTECTED]
Sent: Sun 6/10/2007 11:58 AM
To: Log4J Developers List
Subject: Re: logger repository properties & loggingevent
 

On Jun 10, 2007, at 2:57 AM, Scott Deboy wrote:

> log4j 1.3 included the ability to set properties at the logger  
> repository level (if it was a loggerrepositoryex) - logger  
> repository properties would be added to all events associated with  
> the repository.
>
> That feature isn't currently available in the 1.2.15 codebase, and  
> I was curious if it's something that we want to avoid because of  
> backward compatibility issues, or if it's ok to add the feature  
> back in.
>
> In Chainsaw, we use this feature to get all chainsaw-specific  
> logging events to route by default to a chainsaw-log tab.
>

log4j 1.3 reworked LoggingEvent significantly and introduced the  
serialization incompatibilities.  I'm not sure how many of those  
changes were related to repository properties.   I looked at the  
log4j 1.2 code and it looked like the easiest way would be to modify  
LoggingEvent.getMDC() and LoggingEvent.getMDCCopy() to get the  
logger's repo and then check for LoggerRepositoryEx.  However, before  
risking introducing an unintended side-effect on a significant code  
path, I'd really like to understand the immediate need of Chainsaw  
and try to find another approach would not have the same potential  
for calamity.

The only place LoggerRepositoryEx.setProperty() was used seemed to be  
around line 338 in o.a.l.chainsaw.LogUI.  Is there a specific reason  
why calling MDC.set() would not work?

<<winmail.dat>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to