You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Paul Smith <ps...@aconex.com> on 2007/04/06 06:44:43 UTC

1.2 & 1.3 serialization

Well, I'm quite confused about exactly why log4j1.2 events don't  
quite have all the info when read into a 1.3 runtime (specifically  
MDC).  I can only surmise that the reason is that in 1.2 the field is  
called 'mdcCopy' and is a Hashtable, and in 1.3 it's called  
'properties' and is a Map and so the default serialization read can't  
match  them up.

I'm no serialization expert, so I have no idea how to fix this.   
Anyone got any ideas?  I'm quite surprised given the changes between  
1.2 and 1.3 in LoggingEvent that it works at all.

One hack I can think of but might not work is to restore the private  
field called 'mdcCopy' and during serialization transport it to the  
properties object and release the referenence on mdcCopy... ?

Time to re-read up on Serialization Voodoo majik.

Paul

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