logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: Log4j and Serializable classes
Date Tue, 23 Jan 2007 05:35:13 GMT
At 10:13 AM 1/22/2007, you wrote:
 >Log4j works in objects that implements Serializable?
 >If so, how this is possible? If a client receives an object from the
 >server that
 >implements Serializable, how the client knows how to interpret log4j

Log4j Loggers are not Serializable.  You must make them either static 
variables or make them transient.  If it's static, then you don't 
need to do much else.  If it's transient, then you'll need to make 
sure you re-initialize the instance in readObject(), otherwise it 
will be null (or default value if it's a primitive) in the 
deserialized object.  I suggest you read up on serializtion....



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

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

View raw message