logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carn...@apache.org
Subject svn commit: r559716 [3/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/release/config-examples.html
URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4net/release/config-examples.html?view=auto&rev=559716
==============================================================================
--- logging/site/trunk/docs/log4net/release/config-examples.html (added)
+++ logging/site/trunk/docs/log4net/release/config-examples.html Wed Jul 25 23:41:40 2007
@@ -0,0 +1,1193 @@
+<!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: Config Examples</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="building log4net, log4net"></meta>
+
+    
+        <a name="log4net Config Examples"></a><div class="section"><h2>log4net Config Examples</h2>
+        
+            <sectionMenu name="Contents"></sectionMenu>
+
+            <a name="Overview"></a><div class="section"><h2>Overview</h2>
+                <p>
+                    This document presents example configurations for the built-in appenders.
+                    These configurations are designed to work with the 
+                    <span class="code">log4net.Config.DOMConfigurator</span> and the
+                    <span class="code">log4net.Repository.Hierarchy.Hierarchy</span>.
+                </p>
+                <p>
+                    These examples are by no means exhaustive configurations for the appenders.
+                    For a full list of the parameters that can be specified to each appender and
+                    more details on each options see the SDK documentation for the appender.
+                </p>
+            </div>
+            
+            <a name="AdoNetAppender"></a><div class="section"><h2>AdoNetAppender</h2>
+                <p>
+                    For full details see the SDK Reference entry: <a href="sdk/log4net.Appender.AdoNetAppender.html">log4net.Appender.AdoNetAppender</a>.
+                </p>
+                <p>
+                    The configuration of the <span class="code">AdoNetAppender</span> depends on the
+                    provider selected for the target database. Here are some examples.
+                </p>
+                <a name="MS SQL Server"></a><div class="section"><h2>MS SQL Server</h2>
+                    <p>
+                        The following example shows how to configure the <span class="code">AdoNetAppender</span> 
+                        to log messages to a SQL Server database. The events are written in batches of 100
+                        (<i>BufferSize</i>). The <i>ConnectionType</i> specifies the fully qualified type name
+                        for the <span class="code">System.Data.IDbConnection</span> to use to connect to the
+                        database. The <i>ConnectionString</i> is database provider specific.
+                        The <i>CommandText</i> is either a prepared statement or a stored procedure, in this
+                        case it is a prepared statement. Each parameter to the prepared statement or stored procedure
+                        is specified with its name, database type and a layout that renders the value for the
+                        parameter.
+                    </p>
+                    <p>
+                        The database table definition is:
+                    </p>
+                    <div class="source"><pre>
+CREATE TABLE [dbo].[Log] (
+    [Id] [int] IDENTITY (1, 1) NOT NULL,
+    [Date] [datetime] NOT NULL,
+    [Thread] [varchar] (255) NOT NULL,
+    [Level] [varchar] (50) NOT NULL,
+    [Logger] [varchar] (255) NOT NULL,
+    [Message] [varchar] (4000) NOT NULL,
+    [Exception] [varchar] (2000) NULL
+)
+                    </pre></div>
+                    <p>
+                        The appender configuration is:
+                    </p>
+                    <div class="source"><pre>
+&lt;appender name=&quot;AdoNetAppender&quot; type=&quot;log4net.Appender.AdoNetAppender&quot;&gt;
+    &lt;bufferSize value=&quot;100&quot; /&gt;
+    &lt;connectionType value=&quot;System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&quot; /&gt;
+    &lt;connectionString value=&quot;data source=[database server];initial catalog=[database name];integrated security=false;persist security info=True;User ID=[user];Password=[password]&quot; /&gt;
+    &lt;commandText value=&quot;INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message],[Exception]) VALUES (@log_date, @thread, @log_level, @logger, @message, @exception)&quot; /&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@log_date&quot; /&gt;
+        &lt;dbType value=&quot;DateTime&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.RawTimeStampLayout&quot; /&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@thread&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;255&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%thread&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@log_level&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;50&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%level&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@logger&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;255&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%logger&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@message&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;4000&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%message&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@exception&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;2000&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.ExceptionLayout&quot; /&gt;
+    &lt;/parameter&gt;
+&lt;/appender&gt;
+                    </pre></div>
+                </div>
+                
+                <a name="MS Access"></a><div class="section"><h2>MS Access</h2>
+                    <p>
+                        This example shows how to write events to an Access Database.
+                    </p>
+                    <div class="source"><pre>
+&lt;appender name=&quot;AdoNetAppender_Access&quot; type=&quot;log4net.Appender.AdoNetAppender&quot;&gt;
+    &lt;connectionString value=&quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\log\access.mdb;User Id=;Password=;&quot; /&gt;
+    &lt;commandText value=&quot;INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message]) VALUES (@log_date, @thread, @log_level, @logger, @message)&quot; /&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@log_date&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;255&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%date&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@thread&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;255&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%thread&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@log_level&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;50&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%level&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@logger&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;255&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%logger&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@message&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;1024&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%message&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+&lt;/appender&gt;
+                    </pre></div>
+                </div>
+                
+                <a name="Oracle9i"></a><div class="section"><h2>Oracle9i</h2>
+                    <p>
+                        This example shows how to write events to an Oracle9i Database.
+                    </p>
+                    <p>
+                        The database table definition is:
+                    </p>
+                    <div class="source"><pre>
+create table log (
+   Datetime timestamp(3),
+   Thread varchar2(255),
+   Log_Level varchar2(255),
+   Logger varchar2(255),
+   Message varchar2(4000)
+   );
+                    </pre></div>
+                    <p>
+                        The appender configuration is:
+                    </p>
+                    <div class="source"><pre>
+&lt;appender name=&quot;AdoNetAppender_Oracle&quot; type=&quot;log4net.Appender.AdoNetAppender&quot;&gt;
+    &lt;connectionType value=&quot;System.Data.OracleClient.OracleConnection, System.Data.OracleClient, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&quot; /&gt;
+    &lt;connectionString value=&quot;data source=[mydatabase];User ID=[user];Password=[password]&quot; /&gt;
+    &lt;commandText value=&quot;INSERT INTO Log (Datetime,Thread,Log_Level,Logger,Message) VALUES (:log_date, :thread, :log_level, :logger, :message)&quot; /&gt;
+    &lt;bufferSize value=&quot;128&quot; /&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;:log_date&quot; /&gt;
+        &lt;dbType value=&quot;DateTime&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.RawTimeStampLayout&quot; /&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;:thread&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;255&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%thread&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;:log_level&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;50&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%level&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;:logger&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;255&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%logger&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;:message&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;4000&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%message&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+&lt;/appender&gt;
+                    </pre></div>
+                </div>
+            
+                <a name="Oracle8i"></a><div class="section"><h2>Oracle8i</h2>
+                    <p>
+                        This example shows how to write events to an Oracle8i Database.
+                    </p>
+                    <p>
+                        The database table definition is:
+                    </p>
+                    <div class="source"><pre>
+CREATE TABLE CSAX30.LOG
+(
+      THREAD      VARCHAR2(255),
+      LOG_LEVEL   VARCHAR2(255),
+      LOGGER      VARCHAR2(255),
+      MESSAGE     VARCHAR2(4000)
+)
+TABLESPACE CSAX30D LOGGING
+                    </pre></div>
+                    <p>
+                        The appender configuration is:
+                    </p>
+                    <div class="source"><pre>
+&lt;appender name=&quot;AdoNetAppender_Oracle&quot; type=&quot;log4net.Appender.AdoNetAppender&quot;&gt;
+    &lt;connectionType value =&quot;System.Data.OracleClient.OracleConnection, System.Data.OracleClient, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&quot; /&gt;
+    &lt;connectionString value=&quot;data source=&lt;dsname&gt;;User ID=&lt;userid&gt;;Password=&lt;password&gt;&quot; /&gt;
+    &lt;commandText value=&quot;INSERT INTO Log (Log_Level,Logger,Message) VALUES (:log_level, :logger, :message)&quot; /&gt;
+    &lt;bufferSize value=&quot;250&quot; /&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;:log_level&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%level&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;:logger&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%logger&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;:message&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%message&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+&lt;/appender&gt;
+                    </pre></div>
+                </div>
+                
+                <a name="IBM DB2"></a><div class="section"><h2>IBM DB2</h2>
+                    <p>
+                        This example shows how to write events to an IBM DB2 8.2 Database.
+                        The following syntax should also work with older DB2 database servers.
+                    </p>
+                    <p>
+                        The database table definition is:
+                    </p>
+                    <div class="source"><pre>
+CREATE TABLE &quot;myschema.LOG&quot; (
+    &quot;ID&quot; INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (
+        START WITH +1
+        INCREMENT BY +1
+        MINVALUE +1
+        MAXVALUE +2147483647
+        NO CYCLE
+        NO CACHE
+        NO ORDER
+    ),
+    &quot;DATE&quot; TIMESTAMP NOT NULL,
+    &quot;THREAD&quot; VARCHAR(255) NOT NULL,
+    &quot;LEVEL&quot; VARCHAR(500) NOT NULL,
+    &quot;LOGGER&quot; VARCHAR(255) NOT NULL,
+    &quot;MESSAGE&quot; VARCHAR(4000) NOT NULL,
+    &quot;EXCEPTION&quot; VARCHAR(2000)
+)
+IN &quot;LRGTABLES&quot;;
+                    </pre></div>
+                    <p>
+                        The appender configuration is:
+                    </p>
+                    <div class="source"><pre>
+&lt;appender name=&quot;AdoNetAppender&quot; type=&quot;log4net.Appender.AdoNetAppender&quot;&gt;
+    &lt;bufferSize value=&quot;100&quot; /&gt;
+    &lt;connectionType value=&quot;IBM.Data.DB2.DB2Connection,IBM.Data.DB2, Version=8.1.2.1&quot; /&gt;
+    &lt;connectionString value=&quot;server=192.168.0.0;database=dbuser;user Id=username;password=password;persist security info=true&quot; /&gt;
+    &lt;commandText value=&quot;INSERT INTO myschema.Log (Date,Thread,Level,Logger,Message,Exception) VALUES (@log_date,@thread,@log_level,@logger,@message,@exception)&quot; /&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@log_date&quot; /&gt;
+        &lt;dbType value=&quot;DateTime&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.RawTimeStampLayout&quot; /&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@thread&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;255&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%thread&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@log_level&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;500&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%level&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@logger&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;255&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%logger&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@message&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;4000&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%message&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@exception&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;size value=&quot;2000&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.ExceptionLayout&quot; /&gt;
+    &lt;/parameter&gt;
+&lt;/appender&gt;
+                    </pre></div>
+                </div>
+                
+                
+                <a name="SQLite"></a><div class="section"><h2>SQLite</h2>
+                    <p>
+                        This example shows how to write events to a SQLite Database.
+                        This was tested against v0.21 of the 
+                        <a href="http://sourceforge.net/projects/adodotnetsqlite">SQLite .NET provider</a>.
+                    </p>
+                    <p>
+                        SQLite doesn't have strongly-typed columns or field lengths but its 
+                        recommended you still include this information for readability. 
+                        The database table definition is:
+                    </p>
+                    <div class="source"><pre>
+CREATE TABLE Log (
+    LogId        INTEGER PRIMARY KEY,
+    Date        DATETIME NOT NULL,
+    Level        VARCHAR(50) NOT NULL,
+    Logger        VARCHAR(255) NOT NULL,
+    Message        TEXT DEFAULT NULL
+);
+                    </pre></div>
+                    <p>
+                        The appender configuration is:
+                    </p>
+                    <div class="source"><pre>
+&lt;appender name=&quot;AdoNetAppender&quot; type=&quot;log4net.Appender.AdoNetAppender&quot;&gt;
+    &lt;bufferSize value=&quot;100&quot; /&gt;
+    &lt;connectionType value=&quot;Finisar.SQLite.SQLiteConnection, SQLite.NET, Version=0.21.1869.3794, Culture=neutral, PublicKeyToken=c273bd375e695f9c&quot; /&gt;
+    &lt;connectionString value=&quot;Data Source=c:\\inetpub\\wwwroot\\logs\\log4net.db;Version=3;&quot; /&gt;
+    &lt;commandText value=&quot;INSERT INTO Log (Date, Level, Logger, Message) VALUES (@Date, @Level, @Logger, @Message)&quot; /&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@Date&quot; /&gt;
+        &lt;dbType value=&quot;DateTime&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.RawTimeStampLayout&quot; /&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@Level&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%level&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@Logger&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%logger&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+    &lt;parameter&gt;
+        &lt;parameterName value=&quot;@Message&quot; /&gt;
+        &lt;dbType value=&quot;String&quot; /&gt;
+        &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+            &lt;conversionPattern value=&quot;%message&quot; /&gt;
+        &lt;/layout&gt;
+    &lt;/parameter&gt;
+&lt;/appender&gt;
+                    </pre></div>
+                </div>
+                
+            </div>
+                
+            
+            <a name="AspNetTraceAppender"></a><div class="section"><h2>AspNetTraceAppender</h2>
+                <p>
+                    For full details see the SDK Reference entry: <a href="sdk/log4net.Appender.AspNetTraceAppender.html">log4net.Appender.AspNetTraceAppender</a>.
+                </p>
+                <p>
+                    The following example shows how to configure the <span class="code">AspNetTraceAppender</span> 
+                    to log messages to the ASP.NET TraceContext. The messages are written to the 
+                    <span class="code">System.Web.TraceContext.Write</span> method if they are below
+                    level <span class="code">WARN</span>. If they are <span class="code">WARN</span> or above they are written to the 
+                    <span class="code">System.Web.TraceContext.Warn</span> method.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;AspNetTraceAppender&quot; type=&quot;log4net.Appender.AspNetTraceAppender&quot; &gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+            </div>
+            
+            <a name="BufferingForwardingAppender"></a><div class="section"><h2>BufferingForwardingAppender</h2>
+                <p>
+                    For full details see the SDK Reference entry: <a href="sdk/log4net.Appender.BufferingForwardingAppender.html">log4net.Appender.BufferingForwardingAppender</a>.
+                </p>
+                <p>
+                    The following example shows how to configure the <span class="code">BufferingForwardingAppender</span> 
+                    to buffer 100 messages before delivering them to the <i>ConsoleAppender</i>.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;BufferingForwardingAppender&quot; type=&quot;log4net.Appender.BufferingForwardingAppender&quot; &gt;
+    &lt;bufferSize value=&quot;100&quot;/&gt;
+    &lt;appender-ref ref=&quot;ConsoleAppender&quot; /&gt;
+&lt;/appender&gt;
+                </pre></div>
+                <p>
+                    This example shows how to deliver only significant events. A <span class="code">LevelEvaluator</span>
+                    is specified with a threshold of <span class="code">WARN</span>. This means that the events will only
+                    be delivered when a message with level of <span class="code">WARN</span> or higher level is logged.
+                    Up to 512 (<i>BufferSize</i>) previous messages of any level will also be delivered to provide context
+                    information. Messages not sent will be discarded.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;BufferingForwardingAppender&quot; type=&quot;log4net.Appender.BufferingForwardingAppender&quot; &gt;
+    &lt;bufferSize value=&quot;512&quot; /&gt;
+    &lt;lossy value=&quot;true&quot; /&gt;
+    &lt;evaluator type=&quot;log4net.Core.LevelEvaluator&quot;&gt;
+        &lt;threshold value=&quot;WARN&quot;/&gt;
+    &lt;/evaluator&gt;
+    &lt;appender-ref ref=&quot;ConsoleAppender&quot; /&gt;
+&lt;/appender&gt;
+                </pre></div>
+            </div>
+            
+            <a name="ColoredConsoleAppender"></a><div class="section"><h2>ColoredConsoleAppender</h2>
+                <p>
+                    For full details see the SDK Reference entry: <a href="sdk/log4net.Appender.ColoredConsoleAppender.html">log4net.Appender.ColoredConsoleAppender</a>.
+                </p>
+                <p>
+                    The following example shows how to configure the <span class="code">ColoredConsoleAppender</span> 
+                    to log messages to the console. By default the messages are sent to the console
+                    standard output stream. This example shows how to highlight error messages.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;ColoredConsoleAppender&quot; type=&quot;log4net.Appender.ColoredConsoleAppender&quot;&gt;
+    &lt;mapping&gt;
+        &lt;level value=&quot;ERROR&quot; /&gt;
+        &lt;foreColor value=&quot;White&quot; /&gt;
+        &lt;backColor value=&quot;Red, HighIntensity&quot; /&gt;
+    &lt;/mapping&gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+                <p>
+                    This example shows how to colorize multiple levels.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;ColoredConsoleAppender&quot; type=&quot;log4net.Appender.ColoredConsoleAppender&quot;&gt;
+    &lt;mapping&gt;
+        &lt;level value=&quot;ERROR&quot; /&gt;
+        &lt;foreColor value=&quot;White&quot; /&gt;
+        &lt;backColor value=&quot;Red, HighIntensity&quot; /&gt;
+    &lt;/mapping&gt;
+    &lt;mapping&gt;
+        &lt;level value=&quot;DEBUG&quot; /&gt;
+        &lt;backColor value=&quot;Green&quot; /&gt;
+    &lt;/mapping&gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+            </div>
+            
+            <a name="ConsoleAppender"></a><div class="section"><h2>ConsoleAppender</h2>
+                <p>
+                    For full details see the SDK Reference entry: <a href="sdk/log4net.Appender.ConsoleAppender.html">log4net.Appender.ConsoleAppender</a>.
+                </p>
+                <p>
+                    The following example shows how to configure the <span class="code">ConsoleAppender</span> 
+                    to log messages to the console. By default the messages are sent to the console
+                    standard output stream.
+                </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 [%property{NDC}] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+                <p>
+                    This example shows how to direct the log messages to the console error stream.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;ConsoleAppender&quot; type=&quot;log4net.Appender.ConsoleAppender&quot;&gt;
+    &lt;target value=&quot;Console.Error&quot; /&gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+            </div>
+            
+            <a name="EventLogAppender"></a><div class="section"><h2>EventLogAppender</h2>
+                <p>
+                    For full details see the SDK Reference entry: <a href="sdk/log4net.Appender.EventLogAppender.html">log4net.Appender.EventLogAppender</a>.
+                </p>
+                <p>
+                    The following example shows how to configure the <span class="code">EventLogAppender</span> to log
+                    to the <i>Application</i> event log on the local machine using the
+                    event <i>Source</i> of the <span class="code">AppDomain.FriendlyName</span>.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;EventLogAppender&quot; type=&quot;log4net.Appender.EventLogAppender&quot; &gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+                <p>
+                    This example shows how to configure the <span class="code">EventLogAppender</span> to
+                    use a specific event <i>Source</i>.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;EventLogAppender&quot; type=&quot;log4net.Appender.EventLogAppender&quot; &gt;
+    &lt;applicationName value=&quot;MyApp&quot; /&gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+                <p>
+                    For more information on how to setup the event log to allow the
+                    <span class="code">EventLogAppender</span> to write to it, see the
+                    FAQ: <a href="faq.html#trouble-EventLog">Why doesn't the EventLogAppender work?</a>.
+                </p>
+            </div>
+            
+            <a name="FileAppender"></a><div class="section"><h2>FileAppender</h2>
+                <p>
+                    For full details see the SDK Reference entry: <a href="sdk/log4net.Appender.FileAppender.html">log4net.Appender.FileAppender</a>.
+                </p>
+                <p>
+                    The following example shows how to configure the <span class="code">FileAppender</span>
+                    to write messages to a file. The file specified is <i>log-file.txt</i>. The file will
+                    be appended to rather than overwritten each time the logging process starts.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;FileAppender&quot; type=&quot;log4net.Appender.FileAppender&quot;&gt;
+    &lt;file value=&quot;log-file.txt&quot; /&gt;
+    &lt;appendToFile value=&quot;true&quot; /&gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+                <p>
+                    This example shows how to configure the file name to write to using
+                    an environment variable <i>TMP</i>. The encoding to use to write
+                    to the file is also specified.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;FileAppender&quot; type=&quot;log4net.Appender.FileAppender&quot;&gt;
+    &lt;file value=&quot;${TMP}\log-file.txt&quot; /&gt;
+    &lt;appendToFile value=&quot;true&quot; /&gt;
+    &lt;encoding value=&quot;unicodeFFFE&quot; /&gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+                <p>
+                    This example shows how to configure the appender to use the minimal locking
+                    model that allows multiple processes to write to the same file.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;FileAppender&quot; type=&quot;log4net.Appender.FileAppender&quot;&gt;
+    &lt;file value=&quot;${TMP}\log-file.txt&quot; /&gt;
+    &lt;appendToFile value=&quot;true&quot; /&gt;
+    &lt;lockingModel type=&quot;log4net.Appender.FileAppender+MinimalLock&quot; /&gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+            </div>
+            
+            <a name="ForwardingAppender"></a><div class="section"><h2>ForwardingAppender</h2>
+                <p>
+                    For full details see the SDK Reference entry: <a href="sdk/log4net.Appender.ForwardingAppender.html">log4net.Appender.ForwardingAppender</a>.
+                </p>
+                <p>
+                    The following example shows how to configure the <span class="code">ForwardingAppender</span>.
+                    The forwarding appender allows a set of constraints to be used to decorate an appender.
+                    In this example the <i>ConsoleAppender</i> is decorated with a <i>Threshold</i> of
+                    level <span class="code">WARN</span>. This means that an event directed to the <i>ConsoleAppender</i>
+                    directly will be logged regardless of its level, but an event directed to the <i>ForwardingAppender</i>
+                    will only be passed on to the <i>ConsoleAppender</i> if its level is <span class="code">WARN</span>
+                    or higher. This appender is used only in special circumstances.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;ForwardingAppender&quot; type=&quot;log4net.Appender.ForwardingAppender&quot; &gt;
+    &lt;threshold value=&quot;WARN&quot;/&gt;
+    &lt;appender-ref ref=&quot;ConsoleAppender&quot; /&gt;
+&lt;/appender&gt;
+                </pre></div>
+            </div>
+            
+            <a name="MemoryAppender"></a><div class="section"><h2>MemoryAppender</h2>
+                <p>
+                    For full details see the SDK Reference entry: <a href="sdk/log4net.Appender.MemoryAppender.html">log4net.Appender.MemoryAppender</a>.
+                </p>
+                <p>
+                    It is unlikely that the <span class="code">MemoryAppender</span> will be configured
+                    using a config file, but if you want to do it here's how.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;MemoryAppender&quot; type=&quot;log4net.Appender.MemoryAppender&quot;&gt;
+    &lt;onlyFixPartialEventData value=&quot;true&quot; /&gt;
+&lt;/appender&gt;
+                </pre></div>
+            </div>
+            
+            <a name="NetSendAppender"></a><div class="section"><h2>NetSendAppender</h2>
+                <p>
+                    For full details see the SDK Reference entry: <a href="sdk/log4net.Appender.NetSendAppender.html">log4net.Appender.NetSendAppender</a>.
+                </p>
+                <p>
+                    The following example shows how to configure the <span class="code">NetSendAppender</span>
+                    to deliver messages to a specific user's screen. As this appender is typically only
+                    used for important notifications a <i>Threshold</i> of level <span class="code">Error</span>
+                    is specified. This example delivers the messages to the user <i>nicko</i> on the
+                    machine <i>SQUARE</i>. However things are not always straight forward using the Windows
+                    Messenger Service, one possible outcome using this configuration is that the <i>Server</i>
+                    will broadcast looking for a WINS server which it will then ask to deliver the message
+                    to the <i>Recipient</i>, the WINS server will deliver it to the first terminal that the
+                    user logged in from.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;NetSendAppender&quot; type=&quot;log4net.Appender.NetSendAppender&quot;&gt;
+    &lt;threshold value=&quot;ERROR&quot; /&gt;
+    &lt;server value=&quot;SQUARE&quot; /&gt;
+    &lt;recipient value=&quot;nicko&quot; /&gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+            </div>
+            
+            <a name="OutputDebugStringAppender"></a><div class="section"><h2>OutputDebugStringAppender</h2>
+                <p>
+                    For full details see the SDK Reference entry: <a href="sdk/log4net.Appender.OutputDebugStringAppender.html">log4net.Appender.OutputDebugStringAppender</a>.
+                </p>
+                <p>
+                    The following example shows how to configure the <span class="code">OutputDebugStringAppender</span>
+                    to write logging messages to the <span class="code">OutputDebugString</span> API.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;OutputDebugStringAppender&quot; type=&quot;log4net.Appender.OutputDebugStringAppender&quot; &gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+            </div>
+            
+            <a name="RemotingAppender"></a><div class="section"><h2>RemotingAppender</h2>
+                <p>
+                    For full details see the SDK Reference entry: <a href="sdk/log4net.Appender.RemotingAppender.html">log4net.Appender.RemotingAppender</a>.
+                </p>
+                <p>
+                    The following example shows how to configure the <span class="code">RemotingAppender</span>
+                    to deliver logging events to a specified <i>Sink</i> (in this example
+                    the sink is <span class="code">tcp://localhost:8085/LoggingSink</span>).
+                    In this example the events are delivered in blocks of 95 events because
+                    of the <i>BufferSize</i>. No events are discarded. The <i>OnlyFixPartialEventData</i>
+                    option allows the appender to ignore certain logging event properties that
+                    can be very slow to generate (e.g. the calling location information).
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;RemotingAppender&quot; type=&quot;log4net.Appender.RemotingAppender&quot; &gt;
+    &lt;sink value=&quot;tcp://localhost:8085/LoggingSink&quot; /&gt;
+    &lt;lossy value=&quot;false&quot; /&gt;
+    &lt;bufferSize value=&quot;95&quot; /&gt;
+    &lt;onlyFixPartialEventData value=&quot;true&quot; /&gt;
+&lt;/appender&gt;
+                </pre></div>
+                <p>
+                    This example configures the <span class="code">RemotingAppender</span> to
+                    deliver the events only when an event with level <span class="code">ERROR</span>
+                    or above is logged. When the events are delivered, up to 200 (<i>BufferSize</i>) 
+                    previous events (regardless of level) will be delivered to provide context.
+                    Events not delivered will be discarded.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;RemotingAppender&quot; type=&quot;log4net.Appender.RemotingAppender&quot; &gt;
+    &lt;sink value=&quot;tcp://localhost:8085/LoggingSink&quot; /&gt;
+    &lt;lossy value=&quot;true&quot; /&gt;
+    &lt;bufferSize value=&quot;200&quot; /&gt;
+    &lt;onlyFixPartialEventData value=&quot;true&quot; /&gt;
+    &lt;evaluator type=&quot;log4net.Core.LevelEvaluator&quot;&gt;
+        &lt;threshold value=&quot;ERROR&quot;/&gt;
+    &lt;/evaluator&gt;
+&lt;/appender&gt;
+                </pre></div>
+            </div>
+            
+            <a name="RollingFileAppender"></a><div class="section"><h2>RollingFileAppender</h2>
+                <p>
+                    For full details see the SDK Reference entry: <a href="sdk/log4net.Appender.RollingFileAppender.html">log4net.Appender.RollingFileAppender</a>.
+                </p>
+                <p>
+                    The <span class="code">RollingFileAppender</span> builds on the
+                    <span class="code">FileAppender</span> and has the same options
+                    as that appender.
+                </p>
+                <p>
+                    The following example shows how to configure the <span class="code">RollingFileAppender</span>
+                    to write to the file <i>log.txt</i>. The file written to will always be called <i>log.txt</i>
+                    because the <i>StaticLogFileName</i> param is specified. The file will be rolled based on
+                    a size constraint (<i>RollingStyle</i>). Up to 10 (<i>MaxSizeRollBackups</i>)
+                    old files of 100 KB each (<i>MaximumFileSize</i>) will be kept. These rolled files will be
+                    named: <i>log.txt.1</i>, <i>log.txt.2</i>, <i>log.txt.3</i>, etc...
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;RollingFileAppender&quot; type=&quot;log4net.Appender.RollingFileAppender&quot;&gt;
+    &lt;file value=&quot;log.txt&quot; /&gt;
+    &lt;appendToFile value=&quot;true&quot; /&gt;
+    &lt;rollingStyle value=&quot;Size&quot; /&gt;
+    &lt;maxSizeRollBackups value=&quot;10&quot; /&gt;
+    &lt;maximumFileSize value=&quot;100KB&quot; /&gt;
+    &lt;staticLogFileName value=&quot;true&quot; /&gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+                <p>
+                    This example show how to configure the <span class="code">RollingFileAppender</span>
+                    to roll log files on a date period. This example will roll the log file every minute!
+                    To change the rolling period adjust the <span class="code">DatePattern</span> value.
+                    For example, a date pattern of <span class="code">&quot;yyyyMMdd&quot;</span> will roll every day.
+                    See <span class="code">System.Globalization.DateTimeFormatInfo</span> for a list of available patterns.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;RollingLogFileAppender&quot; type=&quot;log4net.Appender.RollingFileAppender&quot;&gt;
+    &lt;file value=&quot;logfile&quot; /&gt;
+    &lt;appendToFile value=&quot;true&quot; /&gt;
+    &lt;rollingStyle value=&quot;Date&quot; /&gt;
+    &lt;datePattern value=&quot;yyyyMMdd-HHmm&quot; /&gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+                <p>
+                    This example show how to configure the <span class="code">RollingFileAppender</span>
+                    to roll log files on a date period and within a date period on file size. For each day
+                    only the last 10 files of 1MB will be kept.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;RollingLogFileAppender&quot; type=&quot;log4net.Appender.RollingFileAppender&quot;&gt;
+    &lt;file value=&quot;logfile&quot; /&gt;
+    &lt;appendToFile value=&quot;true&quot; /&gt;
+    &lt;rollingStyle value=&quot;Composite&quot; /&gt;
+    &lt;datePattern value=&quot;yyyyMMdd&quot; /&gt;
+    &lt;maxSizeRollBackups value=&quot;10&quot; /&gt;
+    &lt;maximumFileSize value=&quot;1MB&quot; /&gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+                <p>
+                    This example show how to configure the <span class="code">RollingFileAppender</span>
+                    to roll log files once per program execution. The <span class="code">appendToFile</span>
+                    property is set to <span class="code">false</span> to prevent the appender from overwriting
+                    the existing files. The <span class="code">maxSizeRollBackups</span> is set to negative
+                    1 to allow an infinite number of backup files. The file size does have to be limited but
+                    here it is set to 50 Gigabytes which, if a log file exceeds this size limit during a single
+                    run then it will also be rolled.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;RollingLogFileAppender&quot; type=&quot;log4net.Appender.RollingFileAppender&quot;&gt;
+    &lt;file value=&quot;logfile.txt&quot; /&gt;
+    &lt;appendToFile value=&quot;false&quot; /&gt;
+    &lt;rollingStyle value=&quot;Size&quot; /&gt;
+    &lt;maxSizeRollBackups value=&quot;-1&quot; /&gt;
+    &lt;maximumFileSize value=&quot;50GB&quot; /&gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+            </div>
+            
+            <a name="SmtpAppender"></a><div class="section"><h2>SmtpAppender</h2>
+                <p>
+                    For full details see the SDK Reference entry: <a href="sdk/log4net.Appender.SmtpAppender.html">log4net.Appender.SmtpAppender</a>.
+                </p>
+                <p>
+                    The following example shows how to configure the <span class="code">SmtpAppender</span>
+                    to deliver log events via SMTP email. The <i>To</i>, <i>From</i>, <i>Subject</i> and
+                    <i>SmtpHost</i> are required parameters.
+                    This example shows how to deliver only significant events. A <span class="code">LevelEvaluator</span>
+                    is specified with a threshold of <span class="code">WARN</span>. This means that an email
+                    will be sent for each <span class="code">WARN</span> or higher level message that is logged.
+                    Each email will also contain up to 512 (<i>BufferSize</i>) previous messages of any level to
+                    provide context. Messages not sent will be discarded.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;SmtpAppender&quot; type=&quot;log4net.Appender.SmtpAppender&quot;&gt;
+    &lt;to value=&quot;to@domain.com&quot; /&gt;
+    &lt;from value=&quot;from@domain.com&quot; /&gt;
+    &lt;subject value=&quot;test logging message&quot; /&gt;
+    &lt;smtpHost value=&quot;SMTPServer.domain.com&quot; /&gt;
+    &lt;bufferSize value=&quot;512&quot; /&gt;
+    &lt;lossy value=&quot;true&quot; /&gt;
+    &lt;evaluator type=&quot;log4net.Core.LevelEvaluator&quot;&gt;
+        &lt;threshold value=&quot;WARN&quot;/&gt;
+    &lt;/evaluator&gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%newline%date [%thread] %-5level %logger [%property{NDC}] - %message%newline%newline%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+                <p>
+                    This example shows how to configure the <span class="code">SmtpAppender</span>
+                    to deliver all messages in emails with 512 (<i>BufferSize</i>) messages per
+                    email.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;SmtpAppender&quot; type=&quot;log4net.Appender.SmtpAppender&quot;&gt;
+    &lt;to value=&quot;to@domain.com&quot; /&gt;
+    &lt;from value=&quot;from@domain.com&quot; /&gt;
+    &lt;subject value=&quot;test logging message&quot; /&gt;
+    &lt;smtpHost value=&quot;SMTPServer.domain.com&quot; /&gt;
+    &lt;bufferSize value=&quot;512&quot; /&gt;
+    &lt;lossy value=&quot;false&quot; /&gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%newline%date [%thread] %-5level %logger [%property{NDC}] - %message%newline%newline%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+                <p>
+                    This example shows a more verbose formatting layout for the mail messages.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;SmtpAppender&quot; type=&quot;log4net.Appender.SmtpAppender,log4net&quot;&gt;
+    &lt;to value=&quot;to@domain.com&quot; /&gt;
+    &lt;from value=&quot;from@domain.com&quot; /&gt;
+    &lt;subject value=&quot;test logging message&quot; /&gt;
+    &lt;smtpHost value=&quot;SMTPServer.domain.com&quot; /&gt;
+    &lt;bufferSize value=&quot;512&quot; /&gt;
+    &lt;lossy value=&quot;false&quot; /&gt;
+    &lt;evaluator type=&quot;log4net.Core.LevelEvaluator,log4net&quot;&gt;
+        &lt;threshold value=&quot;WARN&quot; /&gt;
+    &lt;/evaluator&gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout,log4net&quot;&gt;
+        &lt;conversionPattern value=&quot;%property{log4net:HostName} :: %level :: %message %newlineLogger: %logger%newlineThread: %thread%newlineDate: %date%newlineNDC: %property{NDC}%newline%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+            </div>
+            
+            <a name="SmtpPickupDirAppender"></a><div class="section"><h2>SmtpPickupDirAppender</h2>
+                <p>
+                    For full details see the SDK Reference entry: <a href="sdk/log4net.Appender.SmtpPickupDirAppender.html">log4net.Appender.SmtpPickupDirAppender</a>.
+                </p>
+                <p>
+                    The <span class="code">SmtpPickupDirAppender</span> is configured similarly
+                    to the <span class="code">SmtpAppender</span>. The only difference is that rather
+                    than specify a <i>SmtpHost</i> parameter a <i>PickupDir</i> must be specified.
+                </p>
+                <p>
+                    The <i>PickupDir</i> parameter is a path that must exist and the code executing the
+                    appender must have permission to create new files and write to them in this directory.
+                    The path is relative to the application's base directory (<span class="code">AppDomain.BaseDirectory</span>).
+                </p>
+                <p>
+                    The following example shows how to configure the <span class="code">SmtpPickupDirAppender</span>
+                    to deliver log events via SMTP email. The <i>To</i>, <i>From</i>, <i>Subject</i> and
+                    <i>PickupDir</i> are required parameters.
+                    This example shows how to deliver only significant events. A <span class="code">LevelEvaluator</span>
+                    is specified with a threshold of <span class="code">WARN</span>. This means that an email
+                    will be sent for each <span class="code">WARN</span> or higher level message that is logged.
+                    Each email will also contain up to 512 (<i>BufferSize</i>) previous messages of any level to
+                    provide context. Messages not sent will be discarded.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;SmtpPickupDirAppender&quot; type=&quot;log4net.Appender.SmtpPickupDirAppender&quot;&gt;
+    &lt;to value=&quot;to@domain.com&quot; /&gt;
+    &lt;from value=&quot;from@domain.com&quot; /&gt;
+    &lt;subject value=&quot;test logging message&quot; /&gt;
+    &lt;pickupDir value=&quot;C:\SmtpPickup&quot; /&gt;
+    &lt;bufferSize value=&quot;512&quot; /&gt;
+    &lt;lossy value=&quot;true&quot; /&gt;
+    &lt;evaluator type=&quot;log4net.Core.LevelEvaluator&quot;&gt;
+        &lt;threshold value=&quot;WARN&quot;/&gt;
+    &lt;/evaluator&gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%newline%date [%thread] %-5level %logger [%property{NDC}] - %message%newline%newline%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+            </div>
+            
+            <a name="TraceAppender"></a><div class="section"><h2>TraceAppender</h2>
+                <p>
+                    For full details see the SDK Reference entry: <a href="sdk/log4net.Appender.TraceAppender.html">log4net.Appender.TraceAppender</a>.
+                </p>
+                <p>
+                    The following example shows how to configure the <span class="code">TraceAppender</span>
+                    to log messages to the <span class="code">System.Diagnostics.Trace</span> system.
+                    This is the tracing system supplied with the .net base class libraries.
+                    See the MSDN documentation for the <span class="code">System.Diagnostics.Trace</span>
+                    class for more details on how to configure the trace system.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;TraceAppender&quot; type=&quot;log4net.Appender.TraceAppender&quot;&gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+            </div>
+            
+            <a name="UdpAppender"></a><div class="section"><h2>UdpAppender</h2>
+                <p>
+                    For full details see the SDK Reference entry: <a href="sdk/log4net.Appender.UdpAppender.html">log4net.Appender.UdpAppender</a>.
+                </p>
+                <p>
+                    The following example shows how to configure the <span class="code">UdpAppender</span>
+                    to send events to a <i>RemoteAddress</i> on the specified <i>RemotePort</i>.
+                </p>
+                <div class="source"><pre>
+&lt;appender name=&quot;UdpAppender&quot; type=&quot;log4net.Appender.UdpAppender&quot;&gt;
+    &lt;localPort value=&quot;8080&quot; /&gt;
+    &lt;remoteAddress value=&quot;224.0.0.1&quot; /&gt;
+    &lt;remotePort value=&quot;8080&quot; /&gt;
+    &lt;layout type=&quot;log4net.Layout.PatternLayout, log4net&quot;&gt;
+        &lt;conversionPattern value=&quot;%-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></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/release/config-examples.html
------------------------------------------------------------------------------
    svn:mime-type = text/html



Mime
View raw message