[slf4j-user] Serializable log adapters
Ceki Gülcü
listid at qos.ch
Mon Mar 12 18:44:11 CET 2007
At 02:09 PM 3/12/2007, Holger Hoffstaette wrote:
>On Sun, 11 Mar 2007 22:29:03 +0000, Jeremy Booth wrote:
>
> > Is there a reason why the adapters don't implement serializable other than
> > a lack of demand? Would it be possible to make them serializable so I can
> > switch?, looking at the javadocs I assume it would be the logger adapter
> > implementations, org.slf4j.spi.LocationAwareLogger and org.slf4j.Logger
> > that would need the change.
>
>I don't think this is either necessary or desirable. If your classes are
>Serializable, make the loggers transient and override readResolve() to
>recreate/set the log instance. Cuts down on useless serialization overhead
>too!
Sounds pretty reasonable to me. Jeremy, would Holger's suggestion above
work for you?
--
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch
More information about the slf4j-user
mailing list