You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Nicko Cadell <ni...@neoworks.com> on 2004/11/16 14:39:28 UTC

RE: appenders Serializable

> 
> Does anyone know if marking the appenders as Serializable 
> would break anything? 
> 

This depends on the appender you are trying to serialise and what state
it is storing. References to thinks like file streams don't serialise.

In general I don't think that appenders expect to be serialized by
value, i.e. where the internal state of the member variables is stored
and a new instance is created in a different appdomain with the variable
state restored. After the variables are restored the ActivateOptions
method will need to be called to allow the appender to initialise again.
You could do this using the custom serialisation constructor
(ISerializable).

Nicko