You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by bo...@apache.org on 2011/09/20 17:40:38 UTC
svn commit: r1173199 - /logging/log4net/trunk/src/site/xdoc/release/faq.xml
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<T></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>