On 3/13/07, <b class="gmail_sendername">Ceki Gülcü</b> <<a href="mailto:listid@qos.ch">listid@qos.ch</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
At 02:09 PM 3/12/2007, Holger Hoffstaette wrote:<br>>On Sun, 11 Mar 2007 22:29:03 +0000, Jeremy Booth wrote:<br>><br>> > Is there a reason why the adapters don't implement serializable other than<br>> > a lack of demand? Would it be possible to make them serializable so I can
<br>> > switch?, looking at the javadocs I assume it would be the logger adapter<br>> > implementations, org.slf4j.spi.LocationAwareLogger and org.slf4j.Logger<br>> > that would need the change.<br>><br>
>I don't think this is either necessary or desirable. If your classes are<br>>Serializable, make the loggers transient and override readResolve() to<br>>recreate/set the log instance. Cuts down on useless serialization overhead
<br>>too!<br><br>Sounds pretty reasonable to me. Jeremy, would Holger's suggestion above<br>work for you?</blockquote><div><br>Implementing readResolve() for every class with a logger field is painful. Would there be any easier way? Of course, the easiest solution is not to use logger for serializable objects, which might make sense.
<br><br>Trustin</div></div>-- <br>what we call human nature is actually human habit<br>--<br><a href="http://gleamynode.net/">http://gleamynode.net/</a><br>--<br>PGP Key ID: 0x0255ECA6