logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r886052 [5/28] - in /websites/production/logging/content/log4net/log4net-1.2.13: ./ css/ images/ images/logos/ release/ release/howto/ release/manual/ release/sdk/ release/sdk/ndoc_msdn_temp/ release/sdk/ndoc_resources/
Date Sun, 10 Nov 2013 08:25:14 GMT
Added: websites/production/logging/content/log4net/log4net-1.2.13/release/config-examples.html
==============================================================================
--- websites/production/logging/content/log4net/log4net-1.2.13/release/config-examples.html (added)
+++ websites/production/logging/content/log4net/log4net-1.2.13/release/config-examples.html Sun Nov 10 08:24:41 2013
@@ -0,0 +1,1289 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- Generated by Apache Maven Doxia at Nov 10, 2013 -->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+    <title>
+        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 name="Date-Revision-yyyymmdd" content="20131110" />
+    <meta http-equiv="Content-Language" content="en" />
+        <meta name="keywords" content="building log4net, log4net" />
+        </head>
+  <body class="composite">
+    <div id="banner">
+                                      <a href="../../" id="bannerLeft">
+                                                <img src="../images/ls-logo.jpg" alt="Apache Logging Services Project" />
+                </a>
+                    <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+            
+        
+                <div class="xleft">
+        <span id="publishDate">Last Published: 2013-11-10</span>
+                  &nbsp;| <span id="projectVersion">Version: 1.2.13</span>
+                          |                           <a href="http://www.apache.org/" class="externalLink" title="Apache">Apache</a>
+        &gt;
+                          <a href="../../" title="Logging Services">Logging Services</a>
+        &gt;
+                          <a href=".././" title="log4net">log4net</a>
+        &gt;
+    
+        Apache log4net: Config Examples
+              </div>
+            <div class="xright">        
+        
+      </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+             
+        
+                                <h5>Apache log4net</h5>
+                  <ul>
+                  <li class="none">
+                          <a href="../index.html" title="About">About</a>
+            </li>
+                  <li class="none">
+                          <a href="../download_log4net.cgi" title="Download">Download</a>
+            </li>
+                  <li class="none">
+                          <a href="../release/release-notes.html" title="Release Notes">Release Notes</a>
+            </li>
+                  <li class="none">
+                          <a href="../license.html" title="License">License</a>
+            </li>
+          </ul>
+                       <h5>Documentation</h5>
+                  <ul>
+                  <li class="none">
+                          <a href="../release/features.html" title="Features">Features</a>
+            </li>
+                  <li class="none">
+                          <a href="../release/framework-support.html" title="Supported Frameworks">Supported Frameworks</a>
+            </li>
+                  <li class="none">
+                          <a href="../release/example-apps.html" title="Example Apps">Example Apps</a>
+            </li>
+                  <li class="none">
+            <strong>Config Examples</strong>
+          </li>
+                  <li class="none">
+                          <a href="../release/building.html" title="Building">Building</a>
+            </li>
+                  <li class="none">
+                          <a href="../release/faq.html" title="FAQ">FAQ</a>
+            </li>
+                  <li class="none">
+                          <a href="../release/howto/index.html" title="How Tos">How Tos</a>
+            </li>
+                  <li class="none">
+                          <a href="../release/sdk/index.html" title="SDK Reference">SDK Reference</a>
+            </li>
+          </ul>
+                       <h5>Manual</h5>
+                  <ul>
+                  <li class="none">
+                          <a href="../release/manual/introduction.html" title="Introduction">Introduction</a>
+            </li>
+                  <li class="none">
+                          <a href="../release/manual/configuration.html" title="Configuration">Configuration</a>
+            </li>
+                  <li class="none">
+                          <a href="../release/manual/contexts.html" title="Contexts">Contexts</a>
+            </li>
+                  <li class="none">
+                          <a href="../release/manual/plugins.html" title="Plugins">Plugins</a>
+            </li>
+                  <li class="none">
+                          <a href="../release/manual/repositories.html" title="Repositories">Repositories</a>
+            </li>
+                  <li class="none">
+                          <a href="../release/manual/internals.html" title="Internals">Internals</a>
+            </li>
+          </ul>
+                       <h5>Community</h5>
+                  <ul>
+                  <li class="none">
+                          <a href="../mail-lists.html" title="Mailing Lists">Mailing Lists</a>
+            </li>
+                  <li class="none">
+                          <a href="../issue-tracking.html" title="Issue Tracking">Issue Tracking</a>
+            </li>
+          </ul>
+                       <h5>Development</h5>
+                  <ul>
+                  <li class="none">
+                          <a href="../source-repository.html" title="Repository">Repository</a>
+            </li>
+                  <li class="none">
+                          <a href="../integration.html" title="Continuous Integration">Continuous Integration</a>
+            </li>
+          </ul>
+                       <h5>Project Documentation</h5>
+                  <ul>
+                                                                                                                                                                                                                                                        <li class="collapsed">
+                          <a href="../project-info.html" title="Project Information">Project Information</a>
+                  </li>
+                                                                    <li class="collapsed">
+                          <a href="../project-reports.html" title="Project Reports">Project Reports</a>
+                  </li>
+          </ul>
+                       <h5>Apache</h5>
+                  <ul>
+                  <li class="none">
+                          <a href="http://www.apache.org/" class="externalLink" title="Home">Home</a>
+            </li>
+                  <li class="none">
+                          <a href="http://www.apache.org/licenses/" class="externalLink" title="License">License</a>
+            </li>
+                  <li class="none">
+                          <a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship">Sponsorship</a>
+            </li>
+                  <li class="none">
+                          <a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks">Thanks</a>
+            </li>
+                  <li class="none">
+                          <a href="http://www.apache.org/security/" class="externalLink" title="Security">Security</a>
+            </li>
+                  <li class="none">
+                          <a href="http://www.apachecon.com" class="externalLink" title="Conferences">Conferences</a>
+            </li>
+          </ul>
+                             <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+        <img class="poweredBy" alt="Built by Maven" src="../images/logos/maven-feather.png" />
+      </a>
+                   
+        
+            </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        <!-- Licensed to the Apache Software Foundation (ASF) under one or more 
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership. 
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with 
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+    
+        <a name="main"></a><div class="section"><h2 id="main">Apache log4net&#x2122; Config Examples</h2>
+        
+            <a name="overview"></a><div class="section"><h2 id="overview">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 id="adonetappender">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="adonetappender-mssql"></a><div class="section"><h2 id="adonetappender-mssql">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="adonetappender-msa"></a><div class="section"><h2 id="adonetappender-msa">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="adonetappender-o9"></a><div class="section"><h2 id="adonetappender-o9">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="adonetappender-o8"></a><div class="section"><h2 id="adonetappender-o8">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="adonetappender-db2"></a><div class="section"><h2 id="adonetappender-db2">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="adonetappender-sqlite"></a><div class="section"><h2 id="adonetappender-sqlite">SQLite</h2>
+                    <p>
+                        This example shows how to write events to a SQLite Database.
+                        This was tested against v0.21 of the 
+                        <a class="externalLink" 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 id="aspnettraceappender">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 id="bufferingforwardingappender">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 id="coloredconsoleappender">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 id="consoleappender">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 id="eventlogappender">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 id="fileappender">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>
+                <p>
+                    This example shows how to configure the appender to use the &quot;inter process&quot; locking
+                    model.
+                </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+InterProcessLock&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>
+                    Before you change the locking model so that
+                    multiple process may log to the same file, please
+                    read the <a href="faq.html#single-file">FAQ</a>.
+                </p>
+            </div>
+            
+            <a name="forwardingappender"></a><div class="section"><h2 id="forwardingappender">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="managedcoloredconsoleappender"></a><div class="section"><h2 id="managedcoloredconsoleappender">ManagedColoredConsoleAppender</h2>
+                <p>
+                    For full details see the SDK Reference entry: <a href="sdk/log4net.Appender.ManagedColoredConsoleAppender.html">log4net.Appender.ManagedColoredConsoleAppender</a>.
+                </p>
+                <p>
+                    The following example shows how to configure the <span class="code">ManagedColoredConsoleAppender</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;ManagedColoredConsoleAppender&quot; type=&quot;log4net.Appender.ManagedColoredConsoleAppender&quot;&gt;
+    &lt;mapping&gt;
+        &lt;level value=&quot;ERROR&quot; /&gt;
+        &lt;foreColor value=&quot;White&quot; /&gt;
+        &lt;backColor value=&quot;Red&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;ManagedColoredConsoleAppender&quot; type=&quot;log4net.Appender.ManagedColoredConsoleAppender&quot;&gt;
+    &lt;mapping&gt;
+        &lt;level value=&quot;ERROR&quot; /&gt;
+        &lt;foreColor value=&quot;DarkRed&quot; /&gt;
+    &lt;/mapping&gt;
+    &lt;mapping&gt;
+        &lt;level value=&quot;WARN&quot; /&gt;
+        &lt;foreColor value=&quot;Yellow&quot; /&gt;
+    &lt;/mapping&gt;
+    &lt;mapping&gt;
+        &lt;level value=&quot;INFO&quot; /&gt;
+        &lt;foreColor value=&quot;White&quot; /&gt;
+    &lt;/mapping&gt;
+    &lt;mapping&gt;
+        &lt;level value=&quot;DEBUG&quot; /&gt;
+        &lt;foreColor value=&quot;Blue&quot; /&gt;
+    &lt;/mapping&gt;
+
+    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
+        &lt;conversionPattern value=&quot;%date %-5level %-20.20logger: %message%newline&quot;/&gt;
+    &lt;/layout&gt;
+&lt;/appender&gt;
+                </pre></div>
+            </div>
+            
+            <a name="memoryappender"></a><div class="section"><h2 id="memoryappender">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 id="netsendappender">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 id="outputdebugstringappender">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 id="remotingappender">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 id="rollingfileappender">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 id="smtpappender">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 id="smtppickupdirappender">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 id="traceappender">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 id="udpappender">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>
+			
+			<a name="dynamicpatternlayout"></a><div class="section"><h2 id="dynamicpatternlayout">DynamicPatternLayout</h2>
+				<p>
+					For full details see the SDK Reference entry: <a href="sdk/log4net.Layout.DynamicPatternLayout.html">log4net.Layout.DynamicPatternLayout</a>.
+				</p>
+				<p>
+					The <span class="code">DynamicPatternLayout</span> should be used whenever the header or footer should contain information that could change over time.
+					Compared to the static <span class="code">PatternLayout</span> which does not re-evaluate on every invoke, the <span class="code">DynamicPatternLayout</span>
+					does re-evaluate the pattern on every invoke. It does, for example, allow to include the current DateTime in the header and/or the footer which was not possible
+					with the static <span class="code">PatternLayout</span>.
+				</p>
+				<p>
+					The following example shows how to configure the <span class="code">DynamicPatternLayout</span>.
+				</p>
+				<div class="source"><pre>
+&lt;layout type=&quot;log4net.Layout.DynamicPatternLayout&quot;&gt; 
+  &lt;param name=&quot;Header&quot; value=&quot;%newline**** Trace Opened Local: %date{yyyy-MM-dd HH:mm:ss.fff} UTC: %utcdate{yyyy-MM-dd HH:mm:ss.fff} ****%newline&quot;/&gt; 
+  &lt;param name=&quot;Footer&quot; value=&quot;**** Trace Closed %date{yyyy-MM-dd HH:mm:ss.fff} ****%newline&quot;/&gt; 
+&lt;/layout&gt;
+				</pre></div>
+			</div>
+        </div>
+        
+    
+
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">
+        <div class="xright">Copyright &#169;                    2004-2013
+                        <a href="http://www.apache.org">Apache Software Foundation</a>.
+                  
+        
+       Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache Software License, Version 2.0</a>.</div><br />
+        <div class="xright">Apache log4net, Apache, log4net, the Apache feather logo, the Apache Logging Services project logo and the Built by Maven logo are trademarks of The Apache Software Foundation.</div>
+        <div class="clear">
+      </div>
+    </div>
+  </body>
+</html>

Propchange: websites/production/logging/content/log4net/log4net-1.2.13/release/config-examples.html
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message