"The SLF4JLog and
  SLF4JLocationAwareLog classes are now serializable solving
  serialization problems encountered with certain libraries which
  attempt to serialize JCL log instances.&quot;<br><br><cite>www.<b>slf4j</b>.<b>org</b>/news.html<br><br>So why doesn&#39;t </cite>org.slf4j.Logger extend java.io.Serializable?<br><br><dl><dt><pre>public class <b><b style="color: black; background-color: rgb(255, 255, 102);">SLF4JLog</b></b><dt>
extends <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></dt><dt>implements <a href="http://www.slf4j.org/apidocs/org/apache/commons/logging/Log.html" title="interface in org.apache.commons.logging">Log</a>, <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></dt>
</pre></dt></dl>


<p>
Implementation of <a href="http://www.slf4j.org/apidocs/org/apache/commons/logging/Log.html" title="interface in org.apache.commons.logging"><code>org.apache.commons.logging.Log</code></a> interface which 
 delegates all processing to a wrapped <a href="http://www.slf4j.org/apidocs/org/slf4j/Logger.html" title="interface in org.slf4j"><code>org.slf4j.Logger</code></a> instance.
 
 </p><p></p>Apparently log4j loggers are not Serializable either: <a href="http://stackoverflow.com/questions/82109/should-a-log4j-logger-be-declared-as-transient">http://stackoverflow.com/questions/82109/should-a-log4j-logger-be-declared-as-transient</a><br>
<br><div class="gmail_quote">On Fri, Dec 11, 2009 at 8:45 AM, Gavin King <span dir="ltr">&lt;<a href="mailto:gavin.king@gmail.com">gavin.king@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Right, it&#39;s definitely not OK if injected loggers just disappear after<br>
passivation.<br>
<div><div></div><div class="h5"><br>
On Fri, Dec 11, 2009 at 11:37 AM, Dan Allen &lt;<a href="mailto:dan.j.allen@gmail.com">dan.j.allen@gmail.com</a>&gt; wrote:<br>
&gt; In this case, is the transient keyword not sufficient? I guess the problem<br>
&gt; is injection won&#39;t happen again after the object is deserialized.<br>
&gt;<br>
&gt; Why does it always come down to loggers. Loggers are just killing Java. So I<br>
&gt; agree, it is rather embarrassing.<br>
&gt;<br>
&gt; -Dan<br>
&gt;<br>
&gt; On Fri, Dec 11, 2009 at 11:27 AM, Gavin King &lt;<a href="mailto:gavin.king@gmail.com">gavin.king@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; This is kind-of embarrassing:<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://www.seamframework.org/Community/InjectLoggerFromSlf4j" target="_blank">http://www.seamframework.org/Community/InjectLoggerFromSlf4j</a><br>
&gt;&gt;<br>
&gt;&gt; We really *do* need static injection points....<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Gavin King<br>
&gt;&gt; <a href="mailto:gavin.king@gmail.com">gavin.king@gmail.com</a><br>
&gt;&gt; <a href="http://in.relation.to/Bloggers/Gavin" target="_blank">http://in.relation.to/Bloggers/Gavin</a><br>
&gt;&gt; <a href="http://hibernate.org" target="_blank">http://hibernate.org</a><br>
&gt;&gt; <a href="http://seamframework.org" target="_blank">http://seamframework.org</a><br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; weld-dev mailing list<br>
&gt;&gt; <a href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Dan Allen<br>
&gt; Senior Software Engineer, Red Hat | Author of Seam in Action<br>
&gt; Registered Linux User #231597<br>
&gt;<br>
&gt; <a href="http://mojavelinux.com" target="_blank">http://mojavelinux.com</a><br>
&gt; <a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br>
&gt; <a href="http://www.google.com/profiles/dan.j.allen" target="_blank">http://www.google.com/profiles/dan.j.allen</a><br>
&gt;<br>
<br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">Gavin King<br>
<a href="mailto:gavin.king@gmail.com">gavin.king@gmail.com</a><br>
<a href="http://in.relation.to/Bloggers/Gavin" target="_blank">http://in.relation.to/Bloggers/Gavin</a><br>
<a href="http://hibernate.org" target="_blank">http://hibernate.org</a><br>
<a href="http://seamframework.org" target="_blank">http://seamframework.org</a><br>
_______________________________________________<br>
weld-dev mailing list<br>
<a href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
</div></div></blockquote></div><br>