logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carn...@apache.org
Subject svn commit: r559716 [16/20] - in /logging/site/trunk/docs/log4net: ./ css/ images/ images/logos/ release/ release/howto/ release/manual/ src/ src/release/ src/release/howto/ src/release/manual/ src/stylesheets/ stylesheets/
Date Thu, 26 Jul 2007 06:41:52 GMT
Added: logging/site/trunk/docs/log4net/src/release/manual/configuration.html
URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4net/src/release/manual/configuration.html?view=auto&rev=559716
==============================================================================
--- logging/site/trunk/docs/log4net/src/release/manual/configuration.html (added)
+++ logging/site/trunk/docs/log4net/src/release/manual/configuration.html Wed Jul 25 23:41:40 2007
@@ -0,0 +1,1379 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+
+
+
+
+
+
+
+
+<html>
+  <head>
+    <title>Apache log4net - 
+        Apache log4net Manual: Configuration</title>
+    <style type="text/css" media="all">
+      @import url("../../../css/maven-base.css");
+      @import url("../../../css/maven-theme.css");
+      @import url("../../../css/site.css");
+    </style>
+    <link rel="stylesheet" href="../../../css/print.css" type="text/css" media="print" />
+          <meta name="author" content="
+        Nicko Cadell" />
+        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+      </head>
+  <body class="composite">
+    <div id="banner">
+                  <a href="http://logging.apache.org/" id="bannerLeft">
+    
+                                            <img src="../../../images/ls-logo.jpg" alt="" />
+    
+            </a>
+                    <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+          
+  
+
+  
+    
+  
+  
+            <div class="xleft">
+        Last Published: 07/26/2007
+                          |   
+          <a href="http://www.apache.org/">Apache</a>
+              &gt;
+      
+          <a href="http://logging.apache.org/">Logging Services</a>
+              &gt;
+      
+          <a href="../../../">log4net</a>
+                        </div>
+            <div class="xright">      
+  
+
+  
+    
+  
+  
+  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+           
+  
+
+  
+    
+  
+  
+                   <h5>Get log4net</h5>
+        <ul>
+              
+    <li class="none">
+              <a href="../../../download.html">Download</a>
+        </li>
+              
+    <li class="none">
+              <a href="../../../changes-report.html">Changes</a>
+        </li>
+              
+    <li class="none">
+              <a href="../../../license.html">License</a>
+        </li>
+          </ul>
+          <h5>About log4net</h5>
+        <ul>
+              
+    <li class="none">
+              <a href="../../../index.html">What is log4net?</a>
+        </li>
+              
+    <li class="none">
+              <a href="../../../faq.html">FAQ</a>
+        </li>
+              
+    <li class="none">
+              <a href="../../../roadmap.html">Roadmap</a>
+        </li>
+          </ul>
+          <h5>Community</h5>
+        <ul>
+              
+    <li class="none">
+              <a href="../../../mail-lists.html">Mailing Lists</a>
+        </li>
+              
+    <li class="none">
+              <a href="../../../issue-tracking.html">Issue Tracking</a>
+        </li>
+          </ul>
+          <h5>Development</h5>
+        <ul>
+              
+    <li class="none">
+              <a href="../../../source-repository.html">Repository</a>
+        </li>
+              
+    <li class="none">
+              <a href="../../../integration.html">Continuous Integration</a>
+        </li>
+          </ul>
+          <h5>Documentation</h5>
+        <ul>
+              
+    <li class="none">
+              <a href="../../../release/manual/introduction.html">Introduction</a>
+        </li>
+          </ul>
+          <h5>Apache</h5>
+        <ul>
+              
+    <li class="none">
+              <a href="http://www.apache.org">Home</a>
+        </li>
+              
+    <li class="none">
+              <a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a>
+        </li>
+              
+    <li class="none">
+              <a href="http://www.apache.org/foundation/thanks.html">Thanks</a>
+        </li>
+              
+    <li class="none">
+              <a href="http://www.apachecon.com">Conferences</a>
+        </li>
+          </ul>
+                                       <a href="http://maven.apache.org/" title="Built by Maven" id="poweredBy">
+            <img alt="Built by Maven" src="../../../images/logos/maven-feather.png"></img>
+          </a>
+                       
+  
+
+  
+    
+  
+  
+        </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        
+
+    
+
+    <meta name="keywords" content="log4net configuration, log4net"></meta>
+
+    
+        <a name="log4net Manual - Configuration"></a><div class="section"><h2>log4net Manual - Configuration</h2>
+            <sectionMenu name="Contents"></sectionMenu>
+
+
+            <a name="Configuration"></a><div class="section"><h2>Configuration</h2>
+                <p>
+                    Inserting log requests into the application code requires a fair amount of 
+                    planning and effort. Observation shows that approximately 4 percent of code is 
+                    dedicated to logging. Consequently, even moderately sized applications will 
+                    have thousands of logging statements embedded within their code. Given their 
+                    number, it becomes imperative to manage these log statements without the need 
+                    to modify them manually.
+                </p>
+                <p>
+                    The log4net environment is fully configurable programmatically. However, it is 
+                    far more flexible to configure log4net using configuration files. Currently, 
+                    configuration files are written in XML.
+                </p>
+                <p>
+                    Let us give a taste of how this is done with the help of an imaginary 
+                    application
+                    <span class="code">MyApp</span>
+                    that uses log4net.
+                </p>
+                <div class="syntax"><pre class="code">
+using Com.Foo;
+
+// Import log4net classes.
+<b>using log4net;
+using log4net.Config;</b>
+
+public class MyApp 
+{
+    // Define a static logger variable so that it references the
+    // Logger instance named &quot;MyApp&quot;.
+    <strong>private static readonly</strong> ILog log = <strong>LogManager.GetLogger(typeof(MyApp));</strong>
+
+    static void Main(string[] args) 
+    {
+        // Set up a simple configuration that logs on the console.
+        <strong>BasicConfigurator.Configure();</strong>
+
+        log.Info(&quot;Entering application.&quot;);
+        Bar bar = new Bar();
+        bar.DoIt();
+        log.Info(&quot;Exiting application.&quot;);
+    }
+}</pre></div>
+                <p>
+                    <span class="code">MyApp</span>
+                    begins by importing log4net related classes. It then defines a static logger 
+                    variable with the name
+                    <span class="code">MyApp</span>
+                    which happens to be the fully qualified name of the class.
+                </p>
+                <p>
+                    <span class="code">MyApp</span>
+                    uses the following
+                    <span class="code">Bar</span>
+                    class:
+                </p>
+                <div class="syntax"><pre class="code">
+// Import log4net classes.
+using log4net;
+
+<b>namespace Com.Foo</b>
+{
+    public class Bar 
+    {
+        <strong>private static readonly</strong> ILog log = <strong>LogManager.GetLogger(typeof(Bar));</strong>
+
+        public void DoIt()
+        {
+            log.Debug(&quot;Did it again!&quot;);
+        }
+    }
+}</pre></div>
+                <p>
+                    The invocation of the
+                    <span class="code">BasicConfigurator.Configure()</span>
+                    method creates a rather simple log4net setup. This method is hardwired to add 
+                    to the <i>root</i> logger a
+                    <span class="code">ConsoleAppender</span>. The output will be formatted using a
+                    <span class="code">PatternLayout</span>
+                    set to the pattern
+                    <span class="code">&quot;%-4timestamp [%thread] %-5level %logger %ndc - %message%newline&quot;</span>.
+                </p>
+                <p>
+                    Note that by default, the <i>root</i> logger is assigned to
+                    <span class="code">Level.DEBUG</span>.
+                </p>
+                <p>
+                    The output of <span class="code">MyApp</span> is:
+                </p>
+                <div class="source"><pre>
+0    [main] INFO  MyApp  - Entering application.
+36   [main] DEBUG Com.Foo.Bar  - Did it again!
+51   [main] INFO  MyApp  - Exiting application.</pre></div>
+                <p>
+                    As a side note, let me mention that in log4net child loggers link only to their 
+                    existing ancestors. In particular, the logger named
+                    <span class="code">Com.Foo.Bar</span>
+                    is linked directly to the
+                    <i>root</i>
+                    logger, thereby circumventing the unused
+                    <span class="code">Com</span>
+                    or
+                    <span class="code">Com.Foo</span>
+                    loggers. This significantly increases performance and reduces log4net's memory 
+                    footprint.
+                </p>
+                <p>
+                    The
+                    <span class="code">MyApp</span>
+                    class configures log4net by invoking
+                    <span class="code">BasicConfigurator.Configure()</span>
+                    method. Other classes only need to import the
+                    <span class="code">log4net</span>
+                    namespace, retrieve the loggers they wish to use, and log away.
+                </p>
+                <p>
+                    The previous example always outputs the same log information. Fortunately, it 
+                    is easy to modify
+                    <span class="code">MyApp</span>
+                    so that the log output can be controlled at run-time. Here is a slightly 
+                    modified version.
+                </p>
+                <div class="syntax"><pre class="code">
+using Com.Foo;
+
+// Import log4net classes.
+using log4net;
+<b>using log4net.Config;</b>
+
+public class MyApp 
+{
+    private static readonly ILog log = LogManager.GetLogger(typeof(MyApp));
+
+    static void Main(string[] args) 
+    {
+        // BasicConfigurator replaced with XmlConfigurator.
+        <strong>XmlConfigurator.Configure(new System.IO.FileInfo(args[0]));</strong>
+
+        log.Info(&quot;Entering application.&quot;);
+        Bar bar = new Bar();
+        bar.DoIt();
+        log.Info(&quot;Exiting application.&quot;);
+    }
+}</pre></div>
+                <p>
+                    This version of
+                    <span class="code">MyApp</span>
+                    instructs the 
+                    <span class="code">XmlConfigurator</span>
+                    to parse a configuration file and set up logging accordingly. The path to the 
+                    configuration file is specified on the command line.
+                </p>
+                <p>
+                    Here is a sample configuration file that results in exactly same output as the 
+                    previous
+                    <span class="code">BasicConfigurator</span>
+                    based example.
+                </p>
+                <div class="source"><pre>
+&lt;log4net&gt;
+    &lt;!-- A1 is set to be a ConsoleAppender --&gt;
+    &lt;appender name=&quot;A1&quot; type=&quot;log4net.Appender.ConsoleAppender&quot;&gt;
+
+        &lt;!-- A1 uses PatternLayout --&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%-4timestamp [%thread] %-5level %logger %ndc - %message%newline&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/appender&gt;
+    
+    &lt;!-- Set root logger level to DEBUG and its only appender to A1 --&gt;
+    &lt;root&gt;
+        &lt;level value=&quot;DEBUG&quot; /&gt;
+        &lt;appender-ref ref=&quot;A1&quot; /&gt;
+    &lt;/root&gt;
+&lt;/log4net&gt;</pre></div>
+                <p>
+                    Suppose we are no longer interested in seeing the output of any component 
+                    belonging to the
+                    <span class="code">Com.Foo</span>
+                    package. The following configuration file shows one possible way of achieving 
+                    this.
+                </p>
+                <div class="source"><pre>
+&lt;log4net&gt;
+    &lt;!-- A1 is set to be a ConsoleAppender --&gt;
+    &lt;appender name=&quot;A1&quot; type=&quot;log4net.Appender.ConsoleAppender&quot;&gt;
+
+        &lt;!-- A1 uses PatternLayout --&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;!-- Print the date in ISO 8601 format --&gt;
+            &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger %ndc - %message%newline&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/appender&gt;
+    
+    &lt;!-- Set root logger level to DEBUG and its only appender to A1 --&gt;
+    &lt;root&gt;
+        &lt;level value=&quot;DEBUG&quot; /&gt;
+        &lt;appender-ref ref=&quot;A1&quot; /&gt;
+    &lt;/root&gt;
+    
+    &lt;!-- Print only messages of level WARN or above in the package Com.Foo --&gt;
+    &lt;logger name=&quot;Com.Foo&quot;&gt;
+        &lt;level value=&quot;WARN&quot; /&gt;
+    &lt;/logger&gt;
+&lt;/log4net&gt;</pre></div>
+                <p>
+                    The output of
+                    <span class="code">MyApp</span>
+                    configured with this file is shown below.
+                </p>
+                <div class="source"><pre>
+2000-09-07 14:07:41,508 [main] INFO  MyApp - Entering application.
+2000-09-07 14:07:41,529 [main] INFO  MyApp - Exiting application.</pre></div>
+                <p>
+                    As the logger
+                    <span class="code">Com.Foo.Bar</span>
+                    does not have an assigned level, it inherits its level from
+                    <span class="code">Com.Foo</span>, which was set to WARN in the configuration 
+                    file. The log statement from the
+                    <span class="code">Bar.DoIt</span>
+                    method has the level DEBUG, lower than the logger level WARN. Consequently,
+                    <span class="code">DoIt()</span>
+                    method's log request is suppressed.
+                </p>
+                <p>
+                    Here is another configuration file that uses multiple appenders.
+                </p>
+                <div class="source"><pre>
+&lt;log4net&gt;
+    &lt;appender name=&quot;Console&quot; type=&quot;log4net.Appender.ConsoleAppender&quot;&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;!-- Pattern to output the caller's file name and line number --&gt;
+            &lt;conversionPattern value=&quot;%5level [%thread] (%file:%line) - %message%newline&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/appender&gt;
+    
+    &lt;appender name=&quot;RollingFile&quot; type=&quot;log4net.Appender.RollingFileAppender&quot;&gt;
+        &lt;file value=&quot;example.log&quot; /&gt;
+        &lt;appendToFile value=&quot;true&quot; /&gt;
+        &lt;maximumFileSize value=&quot;100KB&quot; /&gt;
+        &lt;maxSizeRollBackups value=&quot;2&quot; /&gt;
+
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%level %thread %logger - %message%newline&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/appender&gt;
+    
+    &lt;root&gt;
+        &lt;level value=&quot;DEBUG&quot; /&gt;
+        &lt;appender-ref ref=&quot;Console&quot; /&gt;
+        &lt;appender-ref ref=&quot;RollingFile&quot; /&gt;
+    &lt;/root&gt;
+&lt;/log4net&gt;</pre></div>
+                <p>
+                    Calling the enhanced <span class="code">MyApp</span> with the this configuration file will output the 
+                    following on the console.
+                </p>
+                <div class="source"><pre>
+ INFO [main] (MyApp.cs:16) - Entering application.
+DEBUG [main] (Bar.cs:12) - Doing it again!
+ INFO [main] (MyApp.cs:19) - Exiting application.</pre></div>
+                <p>
+                    In addition, as the <i>root</i> logger has been allocated a second appender, output 
+                    will also be directed to the
+                    <span class="code">example.log</span>
+                    file. This file will be rolled over when it reaches 100KB. When roll-over 
+                    occurs, the old version of
+                    <span class="code">example.log</span>
+                    is automatically moved to
+                    <span class="code">example.log.1</span>.
+                </p>
+                <p>
+                    Note that to obtain these different logging behaviors we did not need to 
+                    recompile code. We could just as easily have logged to an email address, 
+                    redirected all
+                    <span class="code">Com.Foo</span>
+                    output to an NT Event logger, or forwarded logging events to a remote log4net 
+                    server, which would log according to local server policy.
+                </p>
+                <p>
+                    For more examples of configuring appenders using the <span class="code">XmlConfigurator</span>
+                    see the <a href="../config-examples.html">Example Appender Configuration</a> 
+                    document.
+                </p>
+                
+                <a name="Configuration Attributes"></a><div class="section"><h2>Configuration Attributes</h2>
+                    <p>
+                        The log4net configuration can be configured using assembly-level attributes rather than
+                        specified programmatically.
+                    </p>
+                    <ul>
+                        <li>
+                            <b>XmlConfiguratorAttribute</b>
+                            
+                                The <span class="code">log4net.Config.XmlConfiguratorAttribute</span> Allows the
+                                <span class="code">XmlConfigurator</span> to be configured using the following properties:
+                            
+                            <ul>
+                                <li>
+                                    <b>ConfigFile</b>
+                                    
+                                        If specified, this is the filename of the configuration file to use with the
+                                        <span class="code">XmlConfigurator</span>. This file path is relative to the 
+                                        application base directory (<span class="code">AppDomain.CurrentDomain.BaseDirectory</span>).
+                                    
+                                    <p>
+                                        This property cannot be used in conjunction with the 
+                                        <span class="code">ConfigFileExtension</span> property.
+                                    </p>
+                                </li>
+                                <li>
+                                    <b>ConfigFileExtension</b>
+                                    
+                                        If specified, this is the extension for the configuration file. The assembly 
+                                        file name is used as the base name with the this extension appended. For example
+                                        if the assembly is loaded from the a file <span class="code">TestApp.exe</span>
+                                        and the <span class="code">ConfigFileExtension</span> property is set to
+                                        <span class="code">log4net</span> then the configuration file name is 
+                                        <span class="code">TestApp.exe.log4net</span>. This is equivalent to setting the
+                                        <span class="code">ConfigFile</span> property to <span class="code">TestApp.exe.log4net</span>.
+                                    
+                                    <p>
+                                        The path to the configuration file is build by using the application base 
+                                        directory (<span class="code">AppDomain.CurrentDomain.BaseDirectory</span>), 
+                                        the assembly file name and the configuration file extension.
+                                    </p>
+                                    <p>
+                                        This property cannot be used in conjunction with the 
+                                        <span class="code">ConfigFile</span> property.
+                                    </p>
+                                </li>
+                                <li>
+                                    <b>Watch</b>
+                                    
+                                        If this flag is specified and set to <span class="code">true</span>
+                                        then the framework will watch the configuration file and will reload the config 
+                                        each time the file is modified.
+                                    
+                                </li>
+                            </ul>
+                            <p>
+                                If neither of the <span class="code">ConfigFile</span> or <span class="code">ConfigFileExtension</span>
+                                properties are specified, the application configuration file (e.g. <span class="code">TestApp.exe.config</span>) 
+                                will be used as the log4net configuration file.
+                            </p>
+                            <p>
+                                Example usage:
+                            </p>
+                            <div class="syntax"><pre class="code">
+// Configure log4net using the .config file
+<b>[assembly: log4net.Config.XmlConfigurator(Watch=true)]</b>
+// This will cause log4net to look for a configuration file
+// called TestApp.exe.config in the application base
+// directory (i.e. the directory containing TestApp.exe)
+// The config file will be watched for changes.
+                            </pre></div>
+                            <div class="syntax"><pre class="code">
+// Configure log4net using the .log4net file
+<b>[assembly: log4net.Config.XmlConfigurator(ConfigFileExtension=&quot;log4net&quot;,Watch=true)]</b>
+// This will cause log4net to look for a configuration file
+// called TestApp.exe.log4net in the application base
+// directory (i.e. the directory containing TestApp.exe)
+// The config file will be watched for changes.
+                            </pre></div>
+                            <p>
+                                This attribute may only be used once per assembly.
+                            </p>
+                        </li>
+                    </ul>
+                    <p>
+                        Using attributes can be a clearer method for defining where the application's
+                        configuration will be loaded from. However it is worth noting that attributes
+                        are purely passive. They are information only. Therefore if you use configuration
+                        attributes you must invoke log4net to allow it to read the attributes. A simple
+                        call to <span class="code">LogManager.GetLogger</span> will cause the attributes
+                        on the calling assembly to be read and processed. <strong>Therefore it is imperative
+                        to make a logging call as early as possible during the application start-up, and
+                        certainly before any external assemblies have been loaded and invoked.</strong>
+                    </p>
+                </div>
+                
+                <a name="Configuration Files"></a><div class="section"><h2>Configuration Files</h2>
+                    <p>
+                        Typically the log4net configuration is specified using a file. This file can
+                        be read in one of two ways:
+                    </p>
+                    <ul>
+                        <li>Using the .NET <span class="code">System.Configuration</span> API</li>
+                        <li>Reading the file contents directly</li>
+                    </ul>
+                    
+                    <a name=".config Files"></a><div class="section"><h2>.config Files</h2>
+                            
+                            The <span class="code">System.Configuration</span> API is only available if the
+                            configuration data is in the application's config file; the file named 
+                            <i>MyApp.exe.config</i> or <i>Web.config</i>. Because the <span class="code">System.Configuration</span> 
+                            API does not support reloading of the config file the configuration settings 
+                            cannot be watched using the <span class="code">log4net.Config.XmlConfigurator.ConfigureAndWatch</span> 
+                            methods. The main advantage of using the <span class="code">System.Configuration</span>
+                            APIs to read the configuration data is that it requires less permissions than accessing
+                            the configuration file directly.
+                        
+                        
+                            The only way to configure an application using the <span class="code">System.Configuration</span>
+                            APIs is to call the <span class="code">log4net.Config.XmlConfigurator.Configure()</span> method or
+                            the <span class="code">log4net.Config.XmlConfigurator.Configure(ILoggerRepository)</span> method.
+                        
+                        <p>
+                            In order to embed the configuration data in the .config file the section name must be
+                            identified to the .NET config file parser using a <span class="code">configSections</span> element.
+                            The section must specify the <span class="code">log4net.Config.Log4NetConfigurationSectionHandler</span>
+                            that will be used to parse the config section. This type must be fully assembly qualified
+                            because it is being loaded by the .NET config file parser not by log4net. The correct
+                            assembly name for the log4net assembly must be specified.
+                            The following is a simple example configuration file that specifies the correct
+                            section handler to use for the log4net section.
+                        </p>
+                        <div class="source"><pre>
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
+&lt;configuration&gt;
+    &lt;configSections&gt;
+        &lt;section name=&quot;log4net&quot; type=&quot;log4net.Config.Log4NetConfigurationSectionHandler, log4net&quot; /&gt;
+    &lt;/configSections&gt;
+    &lt;log4net&gt;
+        &lt;appender name=&quot;ConsoleAppender&quot; type=&quot;log4net.Appender.ConsoleAppender&quot; &gt;
+            &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+                &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%ndc] - %message%newline&quot; /&gt;
+            &lt;/layout&gt;
+        &lt;/appender&gt;
+        &lt;root&gt;
+            &lt;level value=&quot;INFO&quot; /&gt;
+            &lt;appender-ref ref=&quot;ConsoleAppender&quot; /&gt;
+        &lt;/root&gt;
+    &lt;/log4net&gt;
+&lt;/configuration&gt;</pre></div>
+                        <p>
+                            In the above example the <span class="code">log4net</span> assembly is specified.
+                            This assembly must be located where the .NET runtime can find it. For example it could
+                            be located in the same directory as the application. If the log4net assembly is stored in
+                            the GAC then the fully qualified assembly name must be specified including the culture,
+                            version and public key.
+                        </p>
+                        <p>
+                            When using the .config file to specify the configuration the section name and 
+                            XML element name must be <span class="code">log4net</span>.
+                        </p>
+                    </div>
+                    
+                    <a name="Reading Files Directly"></a><div class="section"><h2>Reading Files Directly</h2>
+                        <p>
+                            The XmlConfigurator can directly read any XML file and use it to configure log4net. 
+                            This includes the application's .config file; the file named <i>MyApp.exe.config</i> 
+                            or <i>Web.config</i>. The only reason not to read the configuration file directly is if the
+                            application does not have sufficient permissions to read the file, then the configuration
+                            must be loaded using the .NET configuration APIs (see above).
+                        </p>
+                        <p>
+                            The file to read the configuration from can be specified using any of
+                            the <span class="code">log4net.Config.XmlConfigurator</span> methods that
+                            accept a <span class="code">System.IO.FileInfo</span> object. Because the
+                            file system can be monitored for file change notifications the 
+                            <span class="code">ConfigureAndWatch</span> methods can be used to monitor
+                            the configuration file for modifications and automatically reconfigure log4net.
+                        </p>
+                        <p>
+                            Additionally the <span class="code">log4net.Config.XmlConfiguratorAttribute</span>
+                            can be used to specify the file to read the configuration from.
+                        </p>
+                        <p>
+                            The configuration is read from the <span class="code">log4net</span> element
+                            in the file. Only one <span class="code">log4net</span> element can be specified
+                            in the file but it may be located anywhere in the XML hierarchy. For example it
+                            may be the root element:
+                        </p>
+                        <div class="source"><pre>
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
+&lt;log4net&gt;
+    &lt;appender name=&quot;ConsoleAppender&quot; type=&quot;log4net.Appender.ConsoleAppender&quot; &gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%ndc] - %message%newline&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/appender&gt;
+    &lt;root&gt;
+        &lt;level value=&quot;INFO&quot; /&gt;
+        &lt;appender-ref ref=&quot;ConsoleAppender&quot; /&gt;
+    &lt;/root&gt;
+&lt;/log4net&gt;</pre></div>
+                        <p>
+                            Or it may be nested within other elements:
+                        </p>
+                        <div class="source"><pre>
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
+&lt;configuration&gt;
+    &lt;configSections&gt;
+        &lt;section name=&quot;log4net&quot; type=&quot;System.Configuration.IgnoreSectionHandler&quot; /&gt;
+    &lt;/configSections&gt;
+    &lt;log4net&gt;
+        &lt;appender name=&quot;ConsoleAppender&quot; type=&quot;log4net.Appender.ConsoleAppender&quot; &gt;
+            &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+                &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%ndc] - %message%newline&quot; /&gt;
+            &lt;/layout&gt;
+        &lt;/appender&gt;
+        &lt;root&gt;
+            &lt;level value=&quot;INFO&quot; /&gt;
+            &lt;appender-ref ref=&quot;ConsoleAppender&quot; /&gt;
+        &lt;/root&gt;
+    &lt;/log4net&gt;
+&lt;/configuration&gt;</pre></div>
+                        <p>
+                            The above example shows how the configuration data can be embedded 
+                            inside a .config file even though the file is being read directly
+                            by log4net. An important note is that the .NET config file parser
+                            will throw an exception if it finds an element that has not been
+                            registered using the <span class="code">configSections</span> element.
+                            Therefore in the above example the <span class="code">log4net</span>
+                            section name is registered, but the type specified to handle the
+                            section is <span class="code">System.Configuration.IgnoreSectionHandler</span>.
+                            This is a built-in class that indicates that another method for reading
+                            the config section will be employed.
+                        </p>
+                    </div>
+                    
+                </div>
+                
+                <a name="Configuration Syntax"></a><div class="section"><h2>Configuration Syntax</h2>
+                    <p>
+                        log4net includes a configuration reader that parses an XML DOM, the 
+                        <span class="code">log4net.Config.XmlConfigurator</span>. This section defines the
+                        syntax accepted by the configurator.
+                    </p>
+                    <p>
+                        This is an example of a valid XML configuration. The root element
+                        must be <span class="code">&lt;log4net&gt;</span>. Note that this does not mean
+                        that this element cannot be embedded in another XML document. See the section above 
+                        on <a href="#configuration.files">Configuration Files</a> for more information
+                        on how to embed the XmlConfigurator XML in a configuration file.
+                    </p>
+                    <div class="source"><pre>
+&lt;log4net&gt;
+    &lt;appender name=&quot;ConsoleAppender&quot; type=&quot;log4net.Appender.ConsoleAppender&quot; &gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%ndc] - %message%newline&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/appender&gt;
+    &lt;root&gt;
+        &lt;level value=&quot;INFO&quot; /&gt;
+        &lt;appender-ref ref=&quot;ConsoleAppender&quot; /&gt;
+    &lt;/root&gt;
+&lt;/log4net&gt;</pre></div>
+                    <p>
+                        The <span class="code">&lt;log4net&gt;</span> element supports the following attributes:
+                    </p>
+                    <div class="table">
+                        <table class="bodyTable">
+                            <colgroup>
+                                <col style="text-align: left; white-space: nowrap; width: 7em"></col>
+                                <col style="text-align: left;"></col>
+                            </colgroup>
+                            <tr class="a">
+                                <th>Attribute</th>
+                                <th>Description</th>
+                            </tr>
+                            <tr class="b">
+                                <td>debug</td>
+                                <td>
+                                    Optional attribute. Value must be either <span class="code">true</span> or <span class="code">false</span>.
+                                    The default value is <span class="code">false</span>. Set this attribute to <span class="code">true</span>
+                                    to enable internal log4net debugging for this configuration.
+                                </td>
+                            </tr>
+                            <tr class="a">
+                                <td>update</td>
+                                <td>
+                                    Optional attribute. Value must be either <span class="code">Merge</span> or <span class="code">Overwrite</span>.
+                                    The default value is <span class="code">Merge</span>. Set this attribute to <span class="code">Overwrite</span>
+                                    to reset the configuration of the repository being configured before applying this configuration.
+                                </td>
+                            </tr>
+                            <tr class="b">
+                                <td>threshold</td>
+                                <td>
+                                    Optional attribute. Value must be the name of a level registered on the repository.
+                                    The default value is <span class="code">ALL</span>. Set this attribute to limit the messages
+                                    that are logged across the whole repository, regardless of the logger that the message is logged to.
+                                </td>
+                            </tr>
+                        </table>
+                    </div>
+                    <p>
+                        The <span class="code">&lt;log4net&gt;</span> element supports the following child elements:
+                    </p>
+                    <div class="table">
+                        <table class="bodyTable">
+                            <colgroup>
+                                <col style="text-align: left; white-space: nowrap; width: 7em"></col>
+                                <col style="text-align: left;"></col>
+                            </colgroup>
+                            <tr class="a">
+                                <th>Element</th>
+                                <th>Description</th>
+                            </tr>
+                            <tr class="b">
+                                <td>appender</td>
+                                <td>
+                                    Zero or more elements allowed. Defines an appender.
+                                </td>
+                            </tr>
+                            <tr class="a">
+                                <td>logger</td>
+                                <td>
+                                    Zero or more elements allowed. Defines the configuration of a logger.
+                                </td>
+                            </tr>
+                            <tr class="b">
+                                <td>renderer</td>
+                                <td>
+                                    Zero or more elements allowed. Defines an object renderer.
+                                </td>
+                            </tr>
+                            <tr class="a">
+                                <td>root</td>
+                                <td>
+                                    Optional element, maximum of one allowed. Defines the configuration of the root logger.
+                                </td>
+                            </tr>
+                            <tr class="b">
+                                <td>param</td>
+                                <td>
+                                    Zero or more elements allowed. Repository specific parameters
+                                </td>
+                            </tr>
+                        </table>
+                    </div>
+                    
+                    <a name="Appenders"></a><div class="section"><h2>Appenders</h2>
+                        <p>
+                            Appenders may only be defined as child elements of the <span class="code">&lt;log4net&gt;</span>
+                            element. Each appender must be uniquely named. The implementing type for the appender must be specified.
+                        </p>
+                        <p>
+                            This example shows an appender of type <span class="code">log4net.Appender.ConsoleAppender</span> being
+                            defined. The appender will be known as <i>ConsoleAppender</i>.
+                        </p>
+                        <div class="source"><pre>
+&lt;appender name=&quot;ConsoleAppender&quot; type=&quot;log4net.Appender.ConsoleAppender&quot; &gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%ndc] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;</pre></div>
+                        
+                        <p>
+                            The <span class="code">&lt;appender&gt;</span> element supports the following attributes:
+                        </p>
+                        <div class="table">
+                            <table class="bodyTable">
+                                <colgroup>
+                                    <col style="text-align: left; white-space: nowrap; width: 7em"></col>
+                                    <col style="text-align: left;"></col>
+                                </colgroup>
+                                <tr class="a">
+                                    <th>Attribute</th>
+                                    <th>Description</th>
+                                </tr>
+                                <tr class="b">
+                                    <td>name</td>
+                                    <td>
+                                        Required attribute. Value must be a string name for this appender. The name must be unique
+                                        among all the appenders defined in this configuration file. This name is used by the 
+                                        <span class="code">&lt;appender-ref&gt;</span> element of a Logger to reference an appender.
+                                    </td>
+                                </tr>
+                                <tr class="a">
+                                    <td>type</td>
+                                    <td>
+                                        Required attribute. Value must be the type name for this appender. If the appender is
+                                        not defined in the log4net assembly this type name must be fully assembly qualified.
+                                    </td>
+                                </tr>
+                            </table>
+                        </div>
+                        <p>
+                            The <span class="code">&lt;appender&gt;</span> element supports the following child elements:
+                        </p>
+                        <div class="table">
+                            <table class="bodyTable">
+                                <colgroup>
+                                    <col style="text-align: left; white-space: nowrap; width: 7em"></col>
+                                    <col style="text-align: left;"></col>
+                                </colgroup>
+                                <tr class="b">
+                                    <th>Element</th>
+                                    <th>Description</th>
+                                </tr>
+                                <tr class="a">
+                                    <td>appender-ref</td>
+                                    <td>
+                                        Zero or more elements allowed. Allows the appender to reference other appenders.
+                                        Not supported by all appenders.
+                                    </td>
+                                </tr>
+                                <tr class="b">
+                                    <td>filter</td>
+                                    <td>
+                                        Zero or more elements allowed. Defines the filters used by this appender.
+                                    </td>
+                                </tr>
+                                <tr class="a">
+                                    <td>layout</td>
+                                    <td>
+                                        Optional element, maximum of one allowed. Defines the layout used by this appender.
+                                    </td>
+                                </tr>
+                                <tr class="b">
+                                    <td>param</td>
+                                    <td>
+                                        Zero or more elements allowed. Appender specific parameters.
+                                    </td>
+                                </tr>
+                            </table>
+                        </div>
+                        
+                        <p>
+                            For examples of configuring appenders see the 
+                            <a href="example-config-appender.html">Example Appender Configuration</a> 
+                            document.
+                        </p>
+                                                
+                        <a name="Filters"></a><div class="section"><h2>Filters</h2>
+                            <p>
+                                Filters elements may only be defined as children of <span class="code">&lt;appender&gt;</span> elements.
+                            </p>
+                            <p>
+                                The <span class="code">&lt;filter&gt;</span> element supports the following attributes:
+                            </p>
+                            <div class="table">
+                                <table class="bodyTable">
+                                    <colgroup>
+                                        <col style="text-align: left; white-space: nowrap; width: 7em"></col>
+                                        <col style="text-align: left;"></col>
+                                    </colgroup>
+                                    <tr class="a">
+                                        <th>Attribute</th>
+                                        <th>Description</th>
+                                    </tr>
+                                    <tr class="b">
+                                        <td>type</td>
+                                        <td>
+                                            Required attribute. Value must be the type name for this filter. If the filter is
+                                            not defined in the log4net assembly this type name must be fully assembly qualified.
+                                        </td>
+                                    </tr>
+                                </table>
+                            </div>
+                            <p>
+                                The <span class="code">&lt;filter&gt;</span> element supports the following child elements:
+                            </p>
+                            <div class="table">
+                                <table class="bodyTable">
+                                    <colgroup>
+                                        <col style="text-align: left; white-space: nowrap; width: 7em"></col>
+                                        <col style="text-align: left;"></col>
+                                    </colgroup>
+                                    <tr class="a">
+                                        <th>Element</th>
+                                        <th>Description</th>
+                                    </tr>
+                                    <tr class="b">
+                                        <td>param</td>
+                                        <td>
+                                            Zero or more elements allowed. Filter specific parameters.
+                                        </td>
+                                    </tr>
+                                </table>
+                            </div>                            
+
+                            <p>
+                                Filters form a chain that the event has to pass through. Any filter along the way can accept the event 
+                                and stop processing, deny the event and stop processing, or allow the event on to the next filter. 
+                                If the event gets to the end of the filter chain without being denied it is implicitly accepted and will be logged.
+                            </p>
+                            <div class="source"><pre>
+&lt;filter type=&quot;log4net.Filter.LevelRangeFilter&quot;&gt;
+    &lt;levelMin value=&quot;INFO&quot; /&gt;
+    &lt;levelMax value=&quot;FATAL&quot; /&gt;
+&lt;/filter&gt;</pre></div>
+                            <p>
+                                This filter will deny events that have a level that is lower than <span class="code">INFO</span>
+                                or higher than <span class="code">FATAL</span>. 
+                                All events between <span class="code">INFO</span> and <span class="code">FATAL</span> will be logged.
+                            </p>
+                            <p>
+                                If we want to only allow messages through that have a specific substring (e.g. 'database') 
+                                then we need to specify the following filters:
+                            </p>
+                            <div class="source"><pre>
+&lt;filter type=&quot;log4net.Filter.StringMatchFilter&quot;&gt;
+    &lt;stringToMatch value=&quot;database&quot; /&gt;
+&lt;/filter&gt;
+&lt;filter type=&quot;log4net.Filter.DenyAllFilter&quot; /&gt;</pre></div>
+                            <p>
+                                The first filter will look for the substring 'database' in the message text of the event. 
+                                If the text is found the filter will accept the message and filter processing will stop, 
+                                the message will be logged. If the substring is not found the event will be passed to 
+                                the next filter to process. If there is no next filter the event would be implicitly 
+                                accepted and would be logged. But because we don't want the non matching events to be 
+                                logged we need to use a <span class="code">log4net.Filter.DenyAllFilter</span>
+                                that will just deny all events that reach it. This filter is only useful at the end of the filter chain.
+                            </p>
+                            <p>
+                                If we want to allow events that have either 'database' or 'ldap' in the message text we can use the following filters:
+                            </p>
+                            <div class="source"><pre>
+&lt;filter type=&quot;log4net.Filter.StringMatchFilter&quot;&gt;
+    &lt;stringToMatch value=&quot;database&quot;/&gt;
+&lt;/filter&gt;
+&lt;filter type=&quot;log4net.Filter.StringMatchFilter&quot;&gt;
+    &lt;stringToMatch value=&quot;ldap&quot;/&gt;
+&lt;/filter&gt;
+&lt;filter type=&quot;log4net.Filter.DenyAllFilter&quot; /&gt;</pre></div>
+                        </div>
+                        
+                        <a name="Layouts"></a><div class="section"><h2>Layouts</h2>
+                            <p>
+                                Layout elements may only be defined as children of <span class="code">&lt;appender&gt;</span> elements.
+                            </p>
+                            <p>
+                                The <span class="code">&lt;layout&gt;</span> element supports the following attributes:
+                            </p>
+                            <div class="table">
+                                <table class="bodyTable">
+                                    <colgroup>
+                                        <col style="text-align: left; white-space: nowrap; width: 7em"></col>
+                                        <col style="text-align: left;"></col>
+                                    </colgroup>
+                                    <tr class="a">
+                                        <th>Attribute</th>
+                                        <th>Description</th>
+                                    </tr>
+                                    <tr class="b">
+                                        <td>type</td>
+                                        <td>
+                                            Required attribute. Value must be the type name for this layout. If the layout is
+                                            not defined in the log4net assembly this type name must be fully assembly qualified.
+                                        </td>
+                                    </tr>
+                                </table>
+                            </div>
+                            <p>
+                                The <span class="code">&lt;layout&gt;</span> element supports the following child elements:
+                            </p>
+                            <div class="table">
+                                <table class="bodyTable">
+                                    <colgroup>
+                                        <col style="text-align: left; white-space: nowrap; width: 7em"></col>
+                                        <col style="text-align: left;"></col>
+                                    </colgroup>
+                                    <tr class="a">
+                                        <th>Element</th>
+                                        <th>Description</th>
+                                    </tr>
+                                    <tr class="b">
+                                        <td>param</td>
+                                        <td>
+                                            Zero or more elements allowed. Layout specific parameters.
+                                        </td>
+                                    </tr>
+                                </table>
+                            </div>
+                            <p>
+                                This example shows how to configure a layout that uses the <span class="code">log4net.Layout.PatternLayout</span>.
+                            </p>
+                            <div class="source"><pre>
+&lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+    &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%ndc] - %message%newline&quot; /&gt;
+&lt;/layout&gt;</pre></div>
+                            
+                        </div>
+                    </div>
+                    
+                    <a name="Root Logger"></a><div class="section"><h2>Root Logger</h2>
+                        <p>
+                            Only one root logger element may only be defined and it must be a child of <span class="code">&lt;log4net&gt;</span> element.
+                            The root logger is the root of the logger hierarchy. All loggers ultimately inherit from this logger.
+                        </p>
+                        <p>
+                            An example root logger:
+                        </p>
+                        <div class="source"><pre>
+&lt;root&gt;
+    &lt;level value=&quot;INFO&quot; /&gt;
+    &lt;appender-ref ref=&quot;ConsoleAppender&quot; /&gt;
+&lt;/root&gt;</pre></div>
+                        
+                        <p>
+                            The <span class="code">&lt;root&gt;</span> element supports no attributes.
+                        </p>
+                        <p>
+                            The <span class="code">&lt;root&gt;</span> element supports the following child elements:
+                        </p>
+                        <div class="table">
+                            <table class="bodyTable">
+                                <colgroup>
+                                    <col style="text-align: left; white-space: nowrap; width: 7em"></col>
+                                    <col style="text-align: left;"></col>
+                                </colgroup>
+                                <tr class="a">
+                                    <th>Element</th>
+                                    <th>Description</th>
+                                </tr>
+                                <tr class="b">
+                                    <td>appender-ref</td>
+                                    <td>
+                                        Zero or more elements allowed. Allows the logger to reference appenders by name.
+                                    </td>
+                                </tr>
+                                <tr class="a">
+                                    <td>level</td>
+                                    <td>
+                                        Optional element, maximum of one allowed. Defines the logging level for this logger.
+                                        This logger will only accept event that are at this level or above.
+                                    </td>
+                                </tr>
+                                <tr class="b">
+                                    <td>param</td>
+                                    <td>
+                                        Zero or more elements allowed. Logger specific parameters.
+                                    </td>
+                                </tr>
+                            </table>
+                        </div>
+                    </div>
+                    
+                    <a name="Loggers"></a><div class="section"><h2>Loggers</h2>
+                        <p>
+                            Logger elements may only be defined as children of the <span class="code">&lt;log4net&gt;</span> element.
+                        </p>
+                        <p>
+                            An example logger:
+                        </p>
+                        <div class="source"><pre>
+&lt;logger name=&quot;LoggerName&quot;&gt;
+    &lt;level value=&quot;DEBUG&quot; /&gt;
+    &lt;appender-ref ref=&quot;ConsoleAppender&quot; /&gt;
+&lt;/logger&gt;</pre></div>
+                        
+                        <p>
+                            The <span class="code">&lt;logger&gt;</span> element supports the following attributes.
+                        </p>
+                        <div class="table">
+                            <table class="bodyTable">
+                                <colgroup>
+                                    <col style="text-align: left; white-space: nowrap; width: 7em"></col>
+                                    <col style="text-align: left;"></col>
+                                </colgroup>
+                                <tr class="a">
+                                    <th>Attribute</th>
+                                    <th>Description</th>
+                                </tr>
+                                <tr class="b">
+                                    <td>name</td>
+                                    <td>
+                                        Required attribute. Value must be the name of the logger.
+                                    </td>
+                                </tr>
+                                <tr class="a">
+                                    <td>additivity</td>
+                                    <td>
+                                        Optional attribute. Value may be either <span class="code">true</span> or <span class="code">false</span>.
+                                        The default value is <span class="code">true</span>. Set this attribute to <span class="code">false</span>
+                                        to prevent this logger from inheriting the appenders defined on parent loggers.
+                                    </td>
+                                </tr>
+                            </table>
+                        </div>
+                        <p>
+                            The <span class="code">&lt;logger&gt;</span> element supports the following child elements:
+                        </p>
+                        <div class="table">
+                            <table class="bodyTable">
+                                <colgroup>
+                                    <col style="text-align: left; white-space: nowrap; width: 7em"></col>
+                                    <col style="text-align: left;"></col>
+                                </colgroup>
+                                <tr class="b">
+                                    <th>Element</th>
+                                    <th>Description</th>
+                                </tr>
+                                <tr class="a">
+                                    <td>appender-ref</td>
+                                    <td>
+                                        Zero or more elements allowed. Allows the logger to reference appenders by name.
+                                    </td>
+                                </tr>
+                                <tr class="b">
+                                    <td>level</td>
+                                    <td>
+                                        Optional element, maximum of one allowed. Defines the logging level for this logger.
+                                        This logger will only accept event that are at this level or above.
+                                    </td>
+                                </tr>
+                                <tr class="a">
+                                    <td>param</td>
+                                    <td>
+                                        Zero or more elements allowed. Logger specific parameters.
+                                    </td>
+                                </tr>
+                            </table>
+                        </div>
+                    </div>
+                    
+                    <a name="Renderers"></a><div class="section"><h2>Renderers</h2>
+                        <p>
+                            Renderer elements may only be defined as children of the <span class="code">&lt;log4net&gt;</span> element.
+                        </p>
+                        <p>
+                            An example renderer:
+                        </p>
+                        <div class="source"><pre>
+&lt;renderer renderingClass=&quot;MyClass.MyRenderer&quot; renderedClass=&quot;MyClass.MyFunkyObject&quot; /&gt;</pre></div>
+                        
+                        <p>
+                            The <span class="code">&lt;renderer&gt;</span> element supports the following attributes.
+                        </p>
+                        <div class="table">
+                            <table class="bodyTable">
+                                <colgroup>
+                                    <col style="text-align: left; white-space: nowrap; width: 7em"></col>
+                                    <col style="text-align: left;"></col>
+                                </colgroup>
+                                <tr class="b">
+                                    <th>Attribute</th>
+                                    <th>Description</th>
+                                </tr>
+                                <tr class="a">
+                                    <td>renderingClass</td>
+                                    <td>
+                                        Required attribute. Value must be the type name for this renderer. If the type is
+                                        not defined in the log4net assembly this type name must be fully assembly qualified.
+                                        This is the type of the object that will take responsibility for rendering the
+                                        <i>renderedClass</i>.
+                                    </td>
+                                </tr>
+                                <tr class="b">
+                                    <td>renderedClass</td>
+                                    <td>
+                                        Required attribute. Value must be the type name for the target type for this renderer. If the type is
+                                        not defined in the log4net assembly this type name must be fully assembly qualified.
+                                        This is the name of the type that this renderer will render.
+                                    </td>
+                                </tr>
+                            </table>
+                        </div>
+                        <p>
+                            The <span class="code">&lt;renderer&gt;</span> element supports no child elements.
+                        </p>
+                    </div>
+                    
+                    <a name="Parameters"></a><div class="section"><h2>Parameters</h2>
+                        <p>
+                            Parameter elements may be children of many elements. See the specific elements above for details.
+                        </p>
+                        <p>
+                            An example param:
+                        </p>
+                        <div class="source"><pre>
+&lt;param name=&quot;ConversionPattern&quot; value=&quot;%date [%thread] %-5level %logger [%ndc] - %message%newline&quot; /&gt;</pre></div>
+                        
+                        <p>
+                            The <span class="code">&lt;param&gt;</span> element supports the following attributes.
+                        </p>
+                        <div class="table">
+                            <table class="bodyTable">
+                                <colgroup>
+                                    <col style="text-align: left; white-space: nowrap; width: 7em"></col>
+                                    <col style="text-align: left;"></col>
+                                </colgroup>
+                                <tr class="a">
+                                    <th>Attribute</th>
+                                    <th>Description</th>
+                                </tr>
+                                <tr class="b">
+                                    <td>name</td>
+                                    <td>
+                                        Required attribute. Value must be the name of the parameter to set on the parent object.
+                                    </td>
+                                </tr>
+                                <tr class="a">
+                                    <td>value</td>
+                                    <td>
+                                        Optional attribute. One of <i>value</i> or <i>type</i> attributes must be specified.
+                                        The value of this attribute is a string that can be converted to the value of the
+                                        parameter.
+                                    </td>
+                                </tr>
+                                <tr class="b">
+                                    <td>type</td>
+                                    <td>
+                                        Optional attribute. One of <i>value</i> or <i>type</i> attributes must be specified.
+                                        The value of this attribute is a type name to create and set as the value of the
+                                        parameter. If the type is not defined in the log4net assembly this type name must 
+                                        be fully assembly qualified.
+                                    </td>
+                                </tr>
+                            </table>
+                        </div>
+                        <p>
+                            The <span class="code">&lt;param&gt;</span> element supports the following child elements:
+                        </p>
+                        <div class="table">
+                            <table class="bodyTable">
+                                <colgroup>
+                                    <col style="text-align: left; white-space: nowrap; width: 7em"></col>
+                                    <col style="text-align: left;"></col>
+                                </colgroup>
+                                <tr class="a">
+                                    <th>Element</th>
+                                    <th>Description</th>
+                                </tr>
+                                <tr class="b">
+                                    <td>param</td>
+                                    <td>
+                                        Zero or more elements allowed. Parameter specific parameters.
+                                    </td>
+                                </tr>
+                            </table>
+                        </div>
+                        <p>
+                            An example param that uses nested param elements:
+                        </p>
+                        <div class="source"><pre>
+&lt;param name=&quot;evaluator&quot; type=&quot;log4net.spi.LevelEvaluator&quot;&gt;
+    &lt;param name=&quot;Threshold&quot; value=&quot;WARN&quot;/&gt;
+&lt;param&gt;</pre></div>
+
+                        <a name="Extension Parameters"></a><div class="section"><h2>Extension Parameters</h2>
+                            <p>
+                                Configuration parameters map directly to writable properties on an object.
+                                The properties available depend on the actual type of the object being
+                                configured. The log4net SDK documentation contains the API reference for
+                                all the components included in the log4net assembly.
+                            </p>
+                            <p>
+                                For 3rd party components please see their relevant API reference for 
+                                details of the properties available.
+                            </p>
+                        </div>
+
+                        <a name="Compact Parameter Syntax"></a><div class="section"><h2>Compact Parameter Syntax</h2>
+                            <p>
+                                All parameters may alternately be specified using the parameter name as the element name
+                                rather than using the <i>param</i> element and <i>name</i> attribute.
+                            </p>
+                            <p>
+                                For example a param:
+                            </p>
+                            <div class="source"><pre>
+&lt;param name=&quot;evaluator&quot; type=&quot;log4net.spi.LevelEvaluator&quot;&gt;
+    &lt;param name=&quot;Threshold&quot; value=&quot;WARN&quot;/&gt;
+&lt;param&gt;</pre></div>
+                            <p>
+                                may be written as:
+                            </p>
+                            <div class="source"><pre>
+&lt;evaluator type=&quot;log4net.spi.LevelEvaluator&quot;&gt;
+    &lt;threshold value=&quot;WARN&quot;/&gt;
+&lt;evaluator&gt;</pre></div>
+                        </div>
+                    </div>
+                </div>
+                
+            </div>
+
+        </div>
+    
+
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">&#169;  
+          2007
+    
+          Apache Software Foundation
+          
+  
+
+  
+    
+  
+  
+  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>

Propchange: logging/site/trunk/docs/log4net/src/release/manual/configuration.html
------------------------------------------------------------------------------
    svn:mime-type = text/html



Mime
View raw message