nicko 2005/08/18 03:17:42 Modified: xdocs/src/release faq.xml Log: Added link to MS KB on event log permissions. For internal debug added info on how to redirect to file. Both from Ron Revision Changes Path 1.7 +41 -28 logging-log4net/xdocs/src/release/faq.xml Index: faq.xml =================================================================== RCS file: /home/cvs/logging-log4net/xdocs/src/release/faq.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- faq.xml 12 May 2005 07:04:57 -0000 1.6 +++ faq.xml 18 Aug 2005 10:17:42 -0000 1.7 @@ -728,22 +728,14 @@
<section id="internalDebug" name="How do I
enable log4net internal debugging?">
<p>
- There are several different
ways to enable internal debugging in log4net.
- These different methods are
listed below. The preferred method is to specify
+ There are 2 different ways to
enable internal debugging in log4net.
+ These are listed below. The
preferred method is to specify
the <span
class="code">log4net.Internal.Debug</span> option in the application's
config file.
</p>
<ul>
<li>
<p>
- To enable
log4net's internal debug programmatically you need
- to set the
<span class="code">log4net.Util.LogLog.InternalDebugging</span>
- property to
<span class="code">true</span>. Obviously the sooner this
- is set the more
debug will be produced.
- </p>
- </li>
- <li>
- <p>
Internal
debugging can also be enabled by setting a value in the application's
configuration
file (not the log4net configuration file, unless the log4net config
data is
embedded in the application's config file). The <span
class="code">log4net.Internal.Debug</span>
@@ -764,22 +756,10 @@
</li>
<li>
<p>
- To enable
internal debugging from a configuration file, the
- <span
class="code">debug</span> attribute on the log4net
- configuration
element can be set to the value <span class="code">true</span>.
- For example:
- </p>
- <div
class="syntax"><pre class="code">
-<log4net debug="true">
-
- ... configuration ...
-
-</log4net></pre></div>
- <p>
- Using this
method does require that your configuration file is located
- and loaded,
otherwise the attribute will not be read. If you need to
- debug the
process of locating the configuration file then use one of the other
- methods for
enabling debugging.
+ To enable
log4net's internal debug programmatically you need
+ to set the
<span class="code">log4net.Util.LogLog.InternalDebugging</span>
+ property to
<span class="code">true</span>. Obviously the sooner this
+ is set the more
debug will be produced.
</p>
</li>
</ul>
@@ -796,6 +776,32 @@
<a
href="http://www.sysinternals.com">http://www.sysinternals.com</a>
may be used to capture these
messages.
</p>
+ <p>
+ As log4net internal debug
messages are written to the <span class="code">System.Diagnostics.Trace</span>
+ system it is possible to
redirect those messages to a local file. You can define
+ a trace listener by adding the
following to your application's .config file:
+ </p>
+ <div class="syntax"><pre class="code">
+<configuration>
+ ...
+
+ <system.diagnostics>
+ <trace autoflush="true">
+ <listeners>
+ <add
+ name="textWriterTraceListener"
+
type="System.Diagnostics.TextWriterTraceListener"
+ initializeData="C:\tmp\log4net.txt"
/>
+ </listeners>
+ </trace>
+ </system.diagnostics>
+
+ ...
+</configuration></pre></div>
+ <p>
+ Make sure that the process
running your application has permission
+ to write to this file.
+ </p>
</section>
<p><a href="#top">Back to Top</a></p>
@@ -822,7 +828,8 @@
<li>
<p>
Make the ASPNET
user a member of the Administrators group. This will work because the
- user will then
have the required permissions. This is not recommended for production use.
+ user will then
have the required permissions. This is <strong>not recommended</strong>
+ for production
use.
</p>
</li>
<li>
@@ -835,6 +842,12 @@
</p>
</li>
</ol>
+ <p>
+ There is a Microsoft Knowledge
Base article that covers this issue and how to resolve
+ it. <a
href="http://support.microsoft.com/default.aspx?scid=kb;en-us;329291">
+ PRB: "Requested
Registry Access Is Not Allowed" Error Message When ASP.NET
+ Application Tries to
Write New EventSource in the EventLog</a>.
+ </p>
</section>
<p><a href="#top">Back to Top</a></p>
@@ -902,7 +915,7 @@
<section id="vsnet-add-reference" name="How do
I make log4net appear in the Visual Studio Add References dialog?">
<p>
- There is a good discussion of
this topic on Robert GcLaws blog:
+ There is a good discussion of
this topic on Robert McLaws blog:
<a
href="http://weblogs.asp.net/rmclaws/archive/2003/11/15/37743.aspx">Building a
Better Server Control Experience, Part 2</a>.
</p>
</section>
