This is pretty much what I did. I originally tried just to extend LoggingEvent and extend the copy behavior. As soon as you are going to plug in a strategy, though, why not strategize the entire container (my solution) as opposed to just the copy method? This seems more flexible in case this area becomes an issue for some other reason later. Same overhead of a single delegation point in the code.
-C -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, January 30, 2004 7:15 PM To: 'Log4J Developers List' Subject: RE: MDC copies Couldn't this problem be solved by making this (serialization) behavior configurable. Moving the serialization logic out of LoggingEvent and into a strategy class. The default behavior could be identical to existing code. Alternate strategy impls could be written to do other interesting things, like deep MDC copy, and retention of the original un-rendered log message, etc... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
