logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1173199 - /logging/log4net/trunk/src/site/xdoc/release/faq.xml
Date Tue, 20 Sep 2011 15:40:38 GMT
Author: bodewig
Date: Tue Sep 20 15:40:38 2011
New Revision: 1173199

URL: http://svn.apache.org/viewvc?rev=1173199&view=rev
Log:
Note difference for generic types between the two approaches of finding a logger in FAQ. 
LOG4NET-157

Modified:
    logging/log4net/trunk/src/site/xdoc/release/faq.xml

Modified: logging/log4net/trunk/src/site/xdoc/release/faq.xml
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/site/xdoc/release/faq.xml?rev=1173199&r1=1173198&r2=1173199&view=diff
==============================================================================
--- logging/log4net/trunk/src/site/xdoc/release/faq.xml (original)
+++ logging/log4net/trunk/src/site/xdoc/release/faq.xml Tue Sep 20 15:40:38 2011
@@ -532,6 +532,18 @@ public class Foo
                     <p>
                         <b>Note:</b> the .NET Compact Framework 1.0 does not
support <span class="code">System.Reflection.MethodBase.GetCurrentMethod()</span>.
                     </p>
+
+                    <p>
+                      <b>Note:</b> the two forms are only equivalent
+                      if <span class="code">Foo</span> is not a
+                      generic class.  For a generic class <span
+                      class="code">Foo&lt;T&gt;</span> the variant
+                      using <span class="code">typeof</span> generates
+                      a different logger for each different type
+                      parameter <span class="code">T</span> while the
+                      variant using reflection generates the same
+                      logger for all <span class="code">T</span>s.
+                    </p>
                 </section>
                 <p><a href="#top">Back to Top</a></p>
 



Mime
View raw message