You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by da...@apache.org on 2020/08/27 07:38:08 UTC
[logging-log4net] 01/03: :memo: add back release docs from develop
branch (upstream) :wrench: configure .gitignore to not ignore release
folder
This is an automated email from the ASF dual-hosted git repository.
davydm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4net.git
commit 931abf604c3fcb98f6e72402a44bbba100011da9
Author: Davyd McColl <da...@gmail.com>
AuthorDate: Wed Aug 26 19:40:28 2020 +0200
:memo: add back release docs from develop branch (upstream)
:wrench: configure .gitignore to not ignore release folder
---
.gitignore | 3 +-
src/site/resources/doap_log4net.rdf | 7 -
src/site/site.xml | 5 +-
src/site/xdoc/release/building.xml | 123 +++
src/site/xdoc/release/config-examples.xml | 1109 ++++++++++++++++++++
src/site/xdoc/release/example-apps.xml | 471 +++++++++
src/site/xdoc/release/faq.xml | 1245 ++++++++++++++++++++++
src/site/xdoc/release/features.xml | 314 ++++++
src/site/xdoc/release/framework-support.xml | 883 ++++++++++++++++
src/site/xdoc/release/howto/chainsaw.xml | 115 ++
src/site/xdoc/release/howto/index.xml | 53 +
src/site/xdoc/release/manual/configuration.xml | 1247 ++++++++++++++++++++++
src/site/xdoc/release/manual/contexts.xml | 249 +++++
src/site/xdoc/release/manual/internals.xml | 259 +++++
src/site/xdoc/release/manual/introduction.xml | 1031 ++++++++++++++++++
src/site/xdoc/release/manual/plugins.xml | 101 ++
src/site/xdoc/release/manual/repositories.xml | 110 ++
src/site/xdoc/release/release-notes.xml | 1342 ++++++++++++++++++++++++
src/site/xdoc/release/security-reports.xml | 64 ++
19 files changed, 8720 insertions(+), 11 deletions(-)
diff --git a/.gitignore b/.gitignore
index 2f634e6..eaa4cc9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,7 +13,6 @@
# Build results
[Dd]ebug/
[Dd]ebugPublic/
-[Rr]elease/
[Rr]eleases/
x64/
x86/
@@ -242,4 +241,4 @@ src/GeneratedAssemblyInfo.cs
build-tools
buildreports
vs_buildtools.exe
-dotnetfx35.exe
\ No newline at end of file
+dotnetfx35.exe
diff --git a/src/site/resources/doap_log4net.rdf b/src/site/resources/doap_log4net.rdf
index 2a6b710..7f38fdf 100644
--- a/src/site/resources/doap_log4net.rdf
+++ b/src/site/resources/doap_log4net.rdf
@@ -110,12 +110,5 @@
<revision>2.0.8</revision>
</Version>
</release>
- <release>
- <Version>
- <name>Apache log4net 2.0.9</name>
- <created>2020-08-24</created>
- <revision>2.0.9</revision>
- </Version>
- </release>
</Project>
</rdf:RDF>
diff --git a/src/site/site.xml b/src/site/site.xml
index aefdd5c..aa20cb6 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -30,6 +30,7 @@
<menu name="Apache log4net" inherit="top" img="icon-home">
<item name="About" href="/index.html"/>
<item name="Download" href="/download_log4net.cgi"/>
+ <item name="Security Reports" href="/release/security-reports.html"/>
<item name="Release Notes" href="/release/release-notes.html"/>
<item name="License" href="/license.html"/>
</menu>
@@ -66,8 +67,8 @@
</menu>
<menu name="Apache" inherit="top" img="icon-info-sign">
- <item name="Home" href="http://www.apache.org/"/>
- <item name="License" href="http://www.apache.org/licenses/"/>
+ <item name="Home" href="http://www.apache.org/"/>
+ <item name="License" href="http://www.apache.org/licenses/"/>
<item name="Sponsorship" href="http://www.apache.org/foundation/sponsorship.html"/>
<item name="Thanks" href="http://www.apache.org/foundation/thanks.html"/>
<item name="Security" href="http://www.apache.org/security/"/>
diff --git a/src/site/xdoc/release/building.xml b/src/site/xdoc/release/building.xml
new file mode 100644
index 0000000..9a9644d
--- /dev/null
+++ b/src/site/xdoc/release/building.xml
@@ -0,0 +1,123 @@
+<?xml version="1.0" ?>
+<!--
+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.
+-->
+<document>
+
+ <properties>
+ <author email="nicko at apache dot org">Nicko Cadell</author>
+ <title>Apache log4net: Building log4net</title>
+ </properties>
+
+ <meta name="keywords" content="building log4net, log4net" />
+
+ <body>
+ <section id="main" name="Building Apache log4net™">
+ <p>
+ The log4net release builds are built using NAnt. Log4net can also be built
+ using Visual Studio .NET 2008 or 2010.
+ </p>
+
+ <section id="vsnet" name="Visual Studio">
+ <p>
+ Visual Studio .NET 2008 and 2010 are supported build platforms for log4net.
+ </p>
+
+ <section id="vsnet-2008" name="Visual Studio .NET 2008">
+ <p>
+ The log4net distribution includes a solution and project file
+ for Visual Studio .NET 2008. Open the <span class="code">log4net.vs2008.sln</span>
+ from the src directory in the distribution.
+ </p>
+ <p>
+ The log4net project requires only the following references:
+ </p>
+ <ul>
+ <li>System</li>
+ <li>System.Configuration</li>
+ <li>System.Data</li>
+ <li>System.Web</li>
+ <li>System.XML</li>
+ </ul>
+ </section>
+
+ <section id="vsnet-2010" name="Visual Studio .NET 2010">
+ <p>
+ The log4net distribution includes a solution and project file
+ for Visual Studio .NET 2010. Open the <span class="code">log4net.vs2010.sln</span>
+ from the src directory in the distribution.
+ </p>
+ <p>
+ The log4net project requires only the following references:
+ </p>
+ <ul>
+ <li>System</li>
+ <li>System.Configuration</li>
+ <li>System.Data</li>
+ <li>System.Web</li>
+ <li>System.XML</li>
+ </ul>
+ </section>
+ </section>
+
+ <section id="nant" name="NAnt">
+ <p>
+ The log4net distribution is built using the NAnt tool.
+ A recent NAnt version 0.91 alpha2 is required to build log4net, this is
+ available from <a href="http://nant.sourceforge.net">nant.sourceforge.net</a>.
+ </p>
+ <p>
+ To support building log4net for the SSCLI framework the NAnt configuration
+ files need to be updated to specify the SSCLI framework directory.
+ </p>
+ <p>
+ To build log4net from the command line, change directory to the root of the
+ log4net distribution, ensure that the nant executable is in the
+ PATH, and then run the following command:
+ </p>
+ <div class="syntax"><pre class="code">
+nant -buildfile:log4net.build compile-all</pre></div>
+ <p>
+ This command will build log4net for all the supported frameworks
+ that are available on the current machine. To list all the build
+ targets that are available run the following command:
+ </p>
+ <div class="syntax"><pre class="code">
+nant -buildfile:log4net.build -projecthelp</pre></div>
+ <p>
+ Under windows the <span class="code">build.cmd</span> can be used
+ to script the nant build. This can be called from a different
+ directory and will locate the correct log4net.build file to use.
+ For example:
+ </p>
+ <div class="syntax"><pre class="code">
+build.cmd compile-all</pre></div>
+ </section>
+
+ <section id="sdk" name="SDK Reference">
+ <p>
+ <a href="https://github.com/EWSoftware/SHFB">Sandcastle
+ Helpfile Builder</a> is used to build the log4net SDK
+ documentation. Running it is currently not
+ integrated with the NAnt build process, you'll
+ have to open and run <code>log4net.shfbproj</code>
+ with SHFB manually.
+ </p>
+ </section>
+
+ </section>
+ </body>
+</document>
diff --git a/src/site/xdoc/release/config-examples.xml b/src/site/xdoc/release/config-examples.xml
new file mode 100644
index 0000000..9d62879
--- /dev/null
+++ b/src/site/xdoc/release/config-examples.xml
@@ -0,0 +1,1109 @@
+<?xml version="1.0" ?>
+<!--
+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.
+-->
+<document>
+
+ <properties>
+ <author email="nicko at apache dot org">Nicko Cadell</author>
+ <title>Apache log4net: Config Examples</title>
+ </properties>
+
+ <meta name="keywords" content="building log4net, log4net" />
+
+ <body>
+ <section id="main" name="Apache log4net™ Config Examples">
+
+ <section id="overview" name="Overview">
+ <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>
+ </section>
+
+ <section id="adonetappender" name="AdoNetAppender">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_AdoNetAppender.htm">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>
+ <section id="adonetappender-mssql" name="MS SQL Server">
+ <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>
+ <source language="sql"><![CDATA[
+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
+)
+ ]]></source>
+ <p>
+ The appender configuration is:
+ </p>
+ <source language="xml"><![CDATA[
+<appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender">
+ <bufferSize value="100" />
+ <connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <connectionString value="data source=[database server];initial catalog=[database name];integrated security=false;persist security info=True;User ID=[user];Password=[password]" />
+ <commandText value="INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message],[Exception]) VALUES (@log_date, @thread, @log_level, @logger, @message, @exception)" />
+ <parameter>
+ <parameterName value="@log_date" />
+ <dbType value="DateTime" />
+ <layout type="log4net.Layout.RawTimeStampLayout" />
+ </parameter>
+ <parameter>
+ <parameterName value="@thread" />
+ <dbType value="String" />
+ <size value="255" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%thread" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value="@log_level" />
+ <dbType value="String" />
+ <size value="50" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%level" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value="@logger" />
+ <dbType value="String" />
+ <size value="255" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%logger" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value="@message" />
+ <dbType value="String" />
+ <size value="4000" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%message" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value="@exception" />
+ <dbType value="String" />
+ <size value="2000" />
+ <layout type="log4net.Layout.ExceptionLayout" />
+ </parameter>
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="adonetappender-msa" name="MS Access">
+ <p>
+ This example shows how to write events to an Access Database.
+ </p>
+ <source language="xml"><![CDATA[
+<appender name="AdoNetAppender_Access" type="log4net.Appender.AdoNetAppender">
+ <connectionString value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\log\access.mdb;User Id=;Password=;" />
+ <commandText value="INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message]) VALUES (@log_date, @thread, @log_level, @logger, @message)" />
+ <parameter>
+ <parameterName value="@log_date" />
+ <dbType value="String" />
+ <size value="255" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value="@thread" />
+ <dbType value="String" />
+ <size value="255" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%thread" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value="@log_level" />
+ <dbType value="String" />
+ <size value="50" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%level" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value="@logger" />
+ <dbType value="String" />
+ <size value="255" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%logger" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value="@message" />
+ <dbType value="String" />
+ <size value="1024" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%message" />
+ </layout>
+ </parameter>
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="adonetappender-o9" name="Oracle9i">
+ <p>
+ This example shows how to write events to an Oracle9i Database.
+ </p>
+ <p>
+ The database table definition is:
+ </p>
+ <source language="sql"><![CDATA[
+create table log (
+ Datetime timestamp(3),
+ Thread varchar2(255),
+ Log_Level varchar2(255),
+ Logger varchar2(255),
+ Message varchar2(4000)
+ );
+ ]]></source>
+ <p>
+ The appender configuration is:
+ </p>
+ <source language="xml"><![CDATA[
+<appender name="AdoNetAppender_Oracle" type="log4net.Appender.AdoNetAppender">
+ <connectionType value="System.Data.OracleClient.OracleConnection, System.Data.OracleClient, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <connectionString value="data source=[mydatabase];User ID=[user];Password=[password]" />
+ <commandText value="INSERT INTO Log (Datetime,Thread,Log_Level,Logger,Message) VALUES (:log_date, :thread, :log_level, :logger, :message)" />
+ <bufferSize value="128" />
+ <parameter>
+ <parameterName value=":log_date" />
+ <dbType value="DateTime" />
+ <layout type="log4net.Layout.RawTimeStampLayout" />
+ </parameter>
+ <parameter>
+ <parameterName value=":thread" />
+ <dbType value="String" />
+ <size value="255" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%thread" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value=":log_level" />
+ <dbType value="String" />
+ <size value="50" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%level" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value=":logger" />
+ <dbType value="String" />
+ <size value="255" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%logger" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value=":message" />
+ <dbType value="String" />
+ <size value="4000" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%message" />
+ </layout>
+ </parameter>
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="adonetappender-o8" name="Oracle8i">
+ <p>
+ This example shows how to write events to an Oracle8i Database.
+ </p>
+ <p>
+ The database table definition is:
+ </p>
+ <source language="sql"><![CDATA[
+CREATE TABLE CSAX30.LOG
+(
+ THREAD VARCHAR2(255),
+ LOG_LEVEL VARCHAR2(255),
+ LOGGER VARCHAR2(255),
+ MESSAGE VARCHAR2(4000)
+)
+TABLESPACE CSAX30D LOGGING
+ ]]></source>
+ <p>
+ The appender configuration is:
+ </p>
+ <source language="xml"><![CDATA[
+<appender name="AdoNetAppender_Oracle" type="log4net.Appender.AdoNetAppender">
+ <connectionType value ="System.Data.OracleClient.OracleConnection, System.Data.OracleClient, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <connectionString value="data source=<dsname>;User ID=<userid>;Password=<password>" />
+ <commandText value="INSERT INTO Log (Log_Level,Logger,Message) VALUES (:log_level, :logger, :message)" />
+ <bufferSize value="250" />
+ <parameter>
+ <parameterName value=":log_level" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%level" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value=":logger" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%logger" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value=":message" />
+ <dbType value="String" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%message" />
+ </layout>
+ </parameter>
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="adonetappender-db2" name="IBM DB2">
+ <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>
+ <source language="sql"><![CDATA[
+CREATE TABLE "myschema.LOG" (
+ "ID" INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (
+ START WITH +1
+ INCREMENT BY +1
+ MINVALUE +1
+ MAXVALUE +2147483647
+ NO CYCLE
+ NO CACHE
+ NO ORDER
+ ),
+ "DATE" TIMESTAMP NOT NULL,
+ "THREAD" VARCHAR(255) NOT NULL,
+ "LEVEL" VARCHAR(500) NOT NULL,
+ "LOGGER" VARCHAR(255) NOT NULL,
+ "MESSAGE" VARCHAR(4000) NOT NULL,
+ "EXCEPTION" VARCHAR(2000)
+)
+IN "LRGTABLES";
+ ]]></source>
+ <p>
+ The appender configuration is:
+ </p>
+ <source language="xml"><![CDATA[
+<appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender">
+ <bufferSize value="100" />
+ <connectionType value="IBM.Data.DB2.DB2Connection,IBM.Data.DB2, Version=8.1.2.1" />
+ <connectionString value="server=192.168.0.0;database=dbuser;user Id=username;password=password;persist security info=true" />
+ <commandText value="INSERT INTO myschema.Log (Date,Thread,Level,Logger,Message,Exception) VALUES (@log_date,@thread,@log_level,@logger,@message,@exception)" />
+ <parameter>
+ <parameterName value="@log_date" />
+ <dbType value="DateTime" />
+ <layout type="log4net.Layout.RawTimeStampLayout" />
+ </parameter>
+ <parameter>
+ <parameterName value="@thread" />
+ <dbType value="String" />
+ <size value="255" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%thread" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value="@log_level" />
+ <dbType value="String" />
+ <size value="500" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%level" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value="@logger" />
+ <dbType value="String" />
+ <size value="255" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%logger" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value="@message" />
+ <dbType value="String" />
+ <size value="4000" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%message" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value="@exception" />
+ <dbType value="String" />
+ <size value="2000" />
+ <layout type="log4net.Layout.ExceptionLayout" />
+ </parameter>
+</appender>
+ ]]></source>
+ </section>
+
+
+ <section id="adonetappender-sqlite" name="SQLite">
+ <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>
+ <source language="sql"><![CDATA[
+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
+);
+ ]]></source>
+ <p>
+ The appender configuration is:
+ </p>
+ <source language="xml"><![CDATA[
+<appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender">
+ <bufferSize value="100" />
+ <connectionType value="Finisar.SQLite.SQLiteConnection, SQLite.NET, Version=0.21.1869.3794, Culture=neutral, PublicKeyToken=c273bd375e695f9c" />
+ <connectionString value="Data Source=c:\\inetpub\\wwwroot\\logs\\log4net.db;Version=3;" />
+ <commandText value="INSERT INTO Log (Date, Level, Logger, Message) VALUES (@Date, @Level, @Logger, @Message)" />
+ <parameter>
+ <parameterName value="@Date" />
+ <dbType value="DateTime" />
+ <layout type="log4net.Layout.RawTimeStampLayout" />
+ </parameter>
+ <parameter>
+ <parameterName value="@Level" />
+ <dbType value="String" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%level" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value="@Logger" />
+ <dbType value="String" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%logger" />
+ </layout>
+ </parameter>
+ <parameter>
+ <parameterName value="@Message" />
+ <dbType value="String" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%message" />
+ </layout>
+ </parameter>
+</appender>
+ ]]></source>
+ </section>
+
+ </section>
+
+
+ <section id="aspnettraceappender" name="AspNetTraceAppender">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_AspNetTraceAppender.htm">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>
+ <source language="xml"><![CDATA[
+<appender name="AspNetTraceAppender" type="log4net.Appender.AspNetTraceAppender" >
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="bufferingforwardingappender" name="BufferingForwardingAppender">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_BufferingForwardingAppender.htm">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>
+ <source language="xml"><![CDATA[
+<appender name="BufferingForwardingAppender" type="log4net.Appender.BufferingForwardingAppender" >
+ <bufferSize value="100"/>
+ <appender-ref ref="ConsoleAppender" />
+</appender>
+ ]]></source>
+ <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>
+ <source language="xml"><![CDATA[
+<appender name="BufferingForwardingAppender" type="log4net.Appender.BufferingForwardingAppender" >
+ <bufferSize value="512" />
+ <lossy value="true" />
+ <evaluator type="log4net.Core.LevelEvaluator">
+ <threshold value="WARN"/>
+ </evaluator>
+ <appender-ref ref="ConsoleAppender" />
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="coloredconsoleappender" name="ColoredConsoleAppender">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_ColoredConsoleAppender.htm">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>
+ <source language="xml"><![CDATA[
+<appender name="ColoredConsoleAppender" type="log4net.Appender.ColoredConsoleAppender">
+ <mapping>
+ <level value="ERROR" />
+ <foreColor value="White" />
+ <backColor value="Red, HighIntensity" />
+ </mapping>
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ <p>
+ This example shows how to colorize multiple levels.
+ </p>
+ <source language="xml"><![CDATA[
+<appender name="ColoredConsoleAppender" type="log4net.Appender.ColoredConsoleAppender">
+ <mapping>
+ <level value="ERROR" />
+ <foreColor value="White" />
+ <backColor value="Red, HighIntensity" />
+ </mapping>
+ <mapping>
+ <level value="DEBUG" />
+ <backColor value="Green" />
+ </mapping>
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="consoleappender" name="ConsoleAppender">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_ConsoleAppender.htm">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>
+ <source language="xml"><![CDATA[
+<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ <p>
+ This example shows how to direct the log messages to the console error stream.
+ </p>
+ <source language="xml"><![CDATA[
+<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
+ <target value="Console.Error" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="eventlogappender" name="EventLogAppender">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_EventLogAppender.htm">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>
+ <source language="xml"><![CDATA[
+<appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ <p>
+ This example shows how to configure the <span class="code">EventLogAppender</span> to
+ use a specific event <i>Source</i>.
+ </p>
+ <source language="xml"><![CDATA[
+<appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
+ <applicationName value="MyApp" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ <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>
+ </section>
+
+ <section id="fileappender" name="FileAppender">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_FileAppender.htm">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>
+ <source language="xml"><![CDATA[
+<appender name="FileAppender" type="log4net.Appender.FileAppender">
+ <file value="log-file.txt" />
+ <appendToFile value="true" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ <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>
+ <source language="xml"><![CDATA[
+<appender name="FileAppender" type="log4net.Appender.FileAppender">
+ <file value="${TMP}\log-file.txt" />
+ <appendToFile value="true" />
+ <encoding value="unicodeFFFE" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ <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>
+ <source language="xml"><![CDATA[
+<appender name="FileAppender" type="log4net.Appender.FileAppender">
+ <file value="${TMP}\log-file.txt" />
+ <appendToFile value="true" />
+ <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ <p>
+ This example shows how to configure the appender to use the "inter process" locking
+ model.
+ </p>
+ <source language="xml"><![CDATA[
+<appender name="FileAppender" type="log4net.Appender.FileAppender">
+ <file value="${TMP}\log-file.txt" />
+ <appendToFile value="true" />
+ <lockingModel type="log4net.Appender.FileAppender+InterProcessLock" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ <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>
+ </section>
+
+ <section id="forwardingappender" name="ForwardingAppender">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_ForwardingAppender.htm">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>
+ <source language="xml"><![CDATA[
+<appender name="ForwardingAppender" type="log4net.Appender.ForwardingAppender" >
+ <threshold value="WARN"/>
+ <appender-ref ref="ConsoleAppender" />
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="managedcoloredconsoleappender" name="ManagedColoredConsoleAppender">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_ManagedColoredConsoleAppender.htm">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>
+ <source language="xml"><![CDATA[
+<appender name="ManagedColoredConsoleAppender" type="log4net.Appender.ManagedColoredConsoleAppender">
+ <mapping>
+ <level value="ERROR" />
+ <foreColor value="White" />
+ <backColor value="Red" />
+ </mapping>
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ <p>
+ This example shows how to colorize multiple levels.
+ </p>
+ <source language="xml"><![CDATA[
+<appender name="ManagedColoredConsoleAppender" type="log4net.Appender.ManagedColoredConsoleAppender">
+ <mapping>
+ <level value="ERROR" />
+ <foreColor value="DarkRed" />
+ </mapping>
+ <mapping>
+ <level value="WARN" />
+ <foreColor value="Yellow" />
+ </mapping>
+ <mapping>
+ <level value="INFO" />
+ <foreColor value="White" />
+ </mapping>
+ <mapping>
+ <level value="DEBUG" />
+ <foreColor value="Blue" />
+ </mapping>
+
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date %-5level %-20.20logger: %message%newline"/>
+ </layout>
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="memoryappender" name="MemoryAppender">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_MemoryAppender.htm">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>
+ <source language="xml"><![CDATA[
+<appender name="MemoryAppender" type="log4net.Appender.MemoryAppender">
+ <onlyFixPartialEventData value="true" />
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="netsendappender" name="NetSendAppender">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_NetSendAppender.htm">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>
+ <source language="xml"><![CDATA[
+<appender name="NetSendAppender" type="log4net.Appender.NetSendAppender">
+ <threshold value="ERROR" />
+ <server value="SQUARE" />
+ <recipient value="nicko" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="outputdebugstringappender" name="OutputDebugStringAppender">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_OutputDebugStringAppender.htm">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>
+ <source language="xml"><![CDATA[
+<appender name="OutputDebugStringAppender" type="log4net.Appender.OutputDebugStringAppender" >
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="remotingappender" name="RemotingAppender">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_RemotingAppender.htm">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>
+ <source language="xml"><![CDATA[
+<appender name="RemotingAppender" type="log4net.Appender.RemotingAppender" >
+ <sink value="tcp://localhost:8085/LoggingSink" />
+ <lossy value="false" />
+ <bufferSize value="95" />
+ <onlyFixPartialEventData value="true" />
+</appender>
+ ]]></source>
+ <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>
+ <source language="xml"><![CDATA[
+<appender name="RemotingAppender" type="log4net.Appender.RemotingAppender" >
+ <sink value="tcp://localhost:8085/LoggingSink" />
+ <lossy value="true" />
+ <bufferSize value="200" />
+ <onlyFixPartialEventData value="true" />
+ <evaluator type="log4net.Core.LevelEvaluator">
+ <threshold value="ERROR"/>
+ </evaluator>
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="rollingfileappender" name="RollingFileAppender">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_RollingFileAppender.htm">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>
+ <source language="xml"><![CDATA[
+<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
+ <file value="log.txt" />
+ <appendToFile value="true" />
+ <rollingStyle value="Size" />
+ <maxSizeRollBackups value="10" />
+ <maximumFileSize value="100KB" />
+ <staticLogFileName value="true" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ <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">"yyyyMMdd"</span> will roll every day.
+ See <span class="code">System.Globalization.DateTimeFormatInfo</span> for a list of available patterns.
+ </p>
+ <source language="xml"><![CDATA[
+<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
+ <file value="logfile" />
+ <appendToFile value="true" />
+ <rollingStyle value="Date" />
+ <datePattern value="yyyyMMdd-HHmm" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ <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>
+ <source language="xml"><![CDATA[
+<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
+ <file value="logfile" />
+ <appendToFile value="true" />
+ <rollingStyle value="Composite" />
+ <datePattern value="yyyyMMdd" />
+ <maxSizeRollBackups value="10" />
+ <maximumFileSize value="1MB" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ <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>
+ <source language="xml"><![CDATA[
+<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
+ <file value="logfile.txt" />
+ <appendToFile value="false" />
+ <rollingStyle value="Size" />
+ <maxSizeRollBackups value="-1" />
+ <maximumFileSize value="50GB" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="smtpappender" name="SmtpAppender">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_SmtpAppender.htm">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>
+ <source language="xml"><![CDATA[
+<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">
+ <to value="to@domain.com" />
+ <from value="from@domain.com" />
+ <subject value="test logging message" />
+ <smtpHost value="SMTPServer.domain.com" />
+ <bufferSize value="512" />
+ <lossy value="true" />
+ <evaluator type="log4net.Core.LevelEvaluator">
+ <threshold value="WARN"/>
+ </evaluator>
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%newline%date [%thread] %-5level %logger [%property{NDC}] - %message%newline%newline%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ <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>
+ <source language="xml"><![CDATA[
+<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">
+ <to value="to@domain.com" />
+ <from value="from@domain.com" />
+ <subject value="test logging message" />
+ <smtpHost value="SMTPServer.domain.com" />
+ <bufferSize value="512" />
+ <lossy value="false" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%newline%date [%thread] %-5level %logger [%property{NDC}] - %message%newline%newline%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ <p>
+ This example shows a more verbose formatting layout for the mail messages.
+ </p>
+ <source language="xml"><![CDATA[
+<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender,log4net">
+ <to value="to@domain.com" />
+ <from value="from@domain.com" />
+ <subject value="test logging message" />
+ <smtpHost value="SMTPServer.domain.com" />
+ <bufferSize value="512" />
+ <lossy value="false" />
+ <evaluator type="log4net.Core.LevelEvaluator,log4net">
+ <threshold value="WARN" />
+ </evaluator>
+ <layout type="log4net.Layout.PatternLayout,log4net">
+ <conversionPattern value="%property{log4net:HostName} :: %level :: %message %newlineLogger: %logger%newlineThread: %thread%newlineDate: %date%newlineNDC: %property{NDC}%newline%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="smtppickupdirappender" name="SmtpPickupDirAppender">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_SmtpPickupDirAppender.htm">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>
+ <source language="xml"><![CDATA[
+<appender name="SmtpPickupDirAppender" type="log4net.Appender.SmtpPickupDirAppender">
+ <to value="to@domain.com" />
+ <from value="from@domain.com" />
+ <subject value="test logging message" />
+ <pickupDir value="C:\SmtpPickup" />
+ <bufferSize value="512" />
+ <lossy value="true" />
+ <evaluator type="log4net.Core.LevelEvaluator">
+ <threshold value="WARN"/>
+ </evaluator>
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%newline%date [%thread] %-5level %logger [%property{NDC}] - %message%newline%newline%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="traceappender" name="TraceAppender">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_TraceAppender.htm">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>
+ <source language="xml"><![CDATA[
+<appender name="TraceAppender" type="log4net.Appender.TraceAppender">
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="udpappender" name="UdpAppender">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_UdpAppender.htm">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>
+ <source language="xml"><![CDATA[
+<appender name="UdpAppender" type="log4net.Appender.UdpAppender">
+ <localPort value="8080" />
+ <remoteAddress value="224.0.0.1" />
+ <remotePort value="8080" />
+ <layout type="log4net.Layout.PatternLayout, log4net">
+ <conversionPattern value="%-5level %logger [%property{NDC}] - %message%newline" />
+ </layout>
+</appender>
+ ]]></source>
+ </section>
+
+ <section id="dynamicpatternlayout" name="DynamicPatternLayout">
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_DynamicPatternLayout.htm">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>
+ <source language="xml"><![CDATA[
+<layout type="log4net.Layout.DynamicPatternLayout">
+ <param name="Header" value="%newline**** Trace Opened Local: %date{yyyy-MM-dd HH:mm:ss.fff} UTC: %utcdate{yyyy-MM-dd HH:mm:ss.fff} ****%newline"/>
+ <param name="Footer" value="**** Trace Closed %date{yyyy-MM-dd HH:mm:ss.fff} ****%newline"/>
+</layout>
+ ]]></source>
+ </section>
+ </section>
+
+ </body>
+</document>
diff --git a/src/site/xdoc/release/example-apps.xml b/src/site/xdoc/release/example-apps.xml
new file mode 100644
index 0000000..ca14888
--- /dev/null
+++ b/src/site/xdoc/release/example-apps.xml
@@ -0,0 +1,471 @@
+<?xml version="1.0" ?>
+<!--
+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.
+-->
+<document>
+
+ <properties>
+ <author email="nicko at apache dot org">Nicko Cadell</author>
+ <title>Apache log4net: Examples</title>
+ </properties>
+
+ <meta name="keywords" content="log4net examples, log4net" />
+
+ <body>
+ <section id="main" name="Apache log4net™ Examples">
+
+ <section id="overview" name="Overview">
+ <p>
+ <strong>The following examples are only available in the log4net source download, not
+ on-line. To obtain the examples <a href="../download_log4net.cgi">download</a> the log4net source release.
+ </strong>
+ </p>
+ </section>
+
+ <section id="building" name="Building Examples">
+ <section id="building-1" name="Building An Example">
+ <p>
+ A single example can be build by running <span class="code">nant</span> from
+ the example directory.
+ </p>
+ <p>
+ For example running <span class="code">nant</span> in the
+ <span class="code">examples\net\1.0\Tutorials\ConsoleApp\cs</span> directory
+ will build the C# version of the Microsoft® .NET 1.0 ConsoleApp example.
+ </p>
+ <p>
+ <span class="code">nant</span> can be run in any directory containing a
+ <span class="code">nant.build</span> file. The typical behavior of the build file
+ is to build all projects under the current directory.
+ </p>
+ <p>
+ For example running <span class="code">nant</span> in the
+ <span class="code">examples\net\1.1</span> directory
+ will build all the examples for the .NET 1.1 platform.
+ </p>
+ </section>
+
+ <section id="building-all" name="Building All Examples">
+ <p>
+ To build all the examples either run <span class="code">nant</span> in the
+ <span class="code">examples</span> directory or you can specify the
+ <span class="code">compile-examples</span> target to the main log4net nant build.
+ </p>
+ </section>
+
+ <section id="building-vsnet" name="Visual Studio .NET">
+ <p>
+ There are Visual Studio .NET 2002 project files for the .NET 1.0 framework.
+ The solution files for C# and VB are in the examples\net\1.0
+ folder.
+ </p>
+ <p>
+ For the Managed C++ project there is a Visual Studio .NET 2003 project file
+ in the examples\net\1.1 folder.
+ </p>
+ </section>
+ </section>
+
+ <section id="examples" name="Examples">
+
+ <section id="consoleapp" name="Tutorial - ConsoleApp">
+ <p>
+ ConsoleApp shows how to write a simple console application that initializes
+ logging and logs various events.
+ </p>
+ <p>
+ This example is available for the following platforms and languages. If a version
+ is not available for your chosen platform and language combination then select the
+ nearest platform for the appropriate language.
+ </p>
+ <ul>
+ <li>
+ <b>MONO 1.0</b>:
+ C#
+ </li>
+ <li>
+ <b>.NET 1.0</b>:
+ C#,
+ VB
+ </li>
+ <li>
+ <b>.NET 1.1</b>:
+ C++,
+ JScript.NET
+ </li>
+ <li>
+ <b>.NET Compact Framework 1.0</b>:
+ C#,
+ VB
+ </li>
+ <li>
+ <b>SSCLI 1.0</b>:
+ JScript.NET
+ </li>
+ </ul>
+ <p>
+ To run this example execute <span class="code">ConsoleApp.exe</span> from the build output directory.
+ </p>
+ </section>
+
+ <section id="webapp" name="Tutorial - WebApp">
+ <p>
+ ConsoleApp shows how to write a simple ASP.NET web application that initializes
+ logging and logs various events.
+ </p>
+ <p>
+ This example is available for the following platforms and languages. If a version
+ is not available for your chosen platform and language combination then select the
+ nearest platform for the appropriate language.
+ </p>
+ <ul>
+ <li>
+ <b>.NET 1.0</b>:
+ C#,
+ VB
+ </li>
+ </ul>
+ <p>
+ To run this example you need to have an ASP.NET container application to
+ host the web application, for example IIS. In IIS create a new virtual
+ directory pointing to the WebApp src directory. Configure IIS to recognize
+ this virtual directory as an application. Open up a web browser, navigate to
+ the virtual directory and to the <span class="code">WebForm1.aspx</span> page within it.
+ </p>
+ </section>
+
+ <section id="remotingclient" name="Remoting - RemotingClient">
+ <p>
+ The RemotingClient application is a simple console application that configures
+ log4net with the RemotingAppender. This appender will attempt to deliver the
+ logging events to a remoting listener. This example should be run in conjunction
+ with the RemotingServer.
+ </p>
+ <p>
+ This example is available for the following platforms and languages. If a version
+ is not available for your chosen platform and language combination then select the
+ nearest platform for the appropriate language.
+ </p>
+ <ul>
+ <li>
+ <b>.NET 1.0</b>:
+ C#
+ </li>
+ </ul>
+ <p>
+ To run this example execute <span class="code">RemotingClient.exe</span> from the build output directory.
+ </p>
+ </section>
+
+ <section id="remotingserver" name="Remoting - RemotingServer">
+ <p>
+ The RemotingServer application is a simple console application that listens for
+ logging events from a remote RemotingAppender and then logs them through the
+ local log4net instance. This example should be run in conjunction
+ with the RemotingClient.
+ </p>
+ <p>
+ This example is available for the following platforms and languages. If a version
+ is not available for your chosen platform and language combination then select the
+ nearest platform for the appropriate language.
+ </p>
+ <ul>
+ <li>
+ <b>.NET 1.0</b>:
+ C#
+ </li>
+ </ul>
+ <p>
+ To run this example execute <span class="code">RemotingServer.exe</span> from the build output directory.
+ While this process is running execute the <span class="code">RemotingClient.exe</span> program on
+ the same machine. The logging events from the client are transferred to the server.
+ </p>
+ </section>
+
+ <section id="rep-simple" name="Repository - SimpleModule">
+ <p>
+ The SimpleModule is a class library that is intended to be used as part of
+ the SimpleApp example,
+ This class library uses the <span class="code">log4net.Config.Repository</span>
+ attribute to create a separate configuration space from other assemblies.
+ </p>
+ <p>
+ This example is available for the following platforms and languages. If a version
+ is not available for your chosen platform and language combination then select the
+ nearest platform for the appropriate language.
+ </p>
+ <ul>
+ <li>
+ <b>MONO 1.0</b>:
+ C#
+ </li>
+ <li>
+ <b>.NET 1.0</b>:
+ C#,
+ VB
+ </li>
+ <li>
+ <b>.NET 1.1</b>:
+ JScript.NET
+ </li>
+ <li>
+ <b>SSCLI 1.0</b>:
+ C#
+ </li>
+ </ul>
+ <p>
+ This library is intended to be used as part of the SimpleApp example.
+ </p>
+ </section>
+
+ <section id="rep-shared" name="Repository - SharedModule">
+ <p>
+ The SharedModule is a class library that is intended to be used as part of
+ the SimpleApp example,
+ This class library uses log4net but does not attempt to configure logging.
+ </p>
+ <p>
+ This example is available for the following platforms and languages. If a version
+ is not available for your chosen platform and language combination then select the
+ nearest platform for the appropriate language.
+ </p>
+ <ul>
+ <li>
+ <b>MONO 1.0</b>:
+ C#
+ </li>
+ <li>
+ <b>.NET 1.0</b>:
+ C#,
+ VB
+ </li>
+ <li>
+ <b>.NET 1.1</b>:
+ JScript.NET
+ </li>
+ <li>
+ <b>SSCLI 1.0</b>:
+ C#
+ </li>
+ </ul>
+ <p>
+ This library is intended to be used as part of the SimpleApp example.
+ </p>
+ </section>
+
+ <section id="rep-app" name="Repository - SimpleApp">
+ <p>
+ The SimpleApp example uses the SimpleModule and SharedModule to demonstrate
+ the ways in which multiple assemblies within the same process may be
+ separately configured.
+ </p>
+ <p>
+ This example is available for the following platforms and languages. If a version
+ is not available for your chosen platform and language combination then select the
+ nearest platform for the appropriate language.
+ </p>
+ <ul>
+ <li>
+ <b>MONO 1.0</b>:
+ C#
+ </li>
+ <li>
+ <b>.NET 1.0</b>:
+ C#,
+ VB
+ </li>
+ <li>
+ <b>.NET 1.1</b>:
+ JScript.NET
+ </li>
+ <li>
+ <b>SSCLI 1.0</b>:
+ C#
+ </li>
+ </ul>
+ <p>
+ To run this example execute <span class="code">SimpleApp.exe</span> from the build output directory.
+ </p>
+ </section>
+
+ <section id="eventidlogapp" name="Extensibility - EventIDLogApp">
+ <p>
+ The EventIDLogApp example demonstrates using the log4net.Ext.EventID extension.
+ The extension needs to be built separately from the
+ <span class="code">extensions\net\1.0\log4net.Ext.EventID</span> directory.
+ </p>
+ <p>
+ This example is available for the following platforms and languages. If a version
+ is not available for your chosen platform and language combination then select the
+ nearest platform for the appropriate language.
+ </p>
+ <ul>
+ <li>
+ <b>.NET 1.0</b>:
+ C#
+ </li>
+ </ul>
+ <p>
+ To run this example execute <span class="code">EventIDLogApp.exe</span> from the build output directory.
+ </p>
+ </section>
+
+ <section id="tracelogapp" name="Extensibility - TraceLogApp">
+ <p>
+ The TraceLogApp example demonstrates using the log4net.Ext.Trace extension.
+ The extension needs to be built separately from the
+ <span class="code">extensions\net\1.0\log4net.Ext.Trace</span> directory.
+ </p>
+ <p>
+ This example is available for the following platforms and languages. If a version
+ is not available for your chosen platform and language combination then select the
+ nearest platform for the appropriate language.
+ </p>
+ <ul>
+ <li>
+ <b>.NET 1.0</b>:
+ C#
+ </li>
+ </ul>
+ <p>
+ To run this example execute <span class="code">TraceLogApp.exe</span> from the build output directory.
+ </p>
+ </section>
+
+ <section id="sampleappenders" name="SampleAppenders">
+ <p>
+ This project includes the following example appenders.
+ </p>
+ <ul>
+ <li>
+ AsyncAppender
+ </li>
+ <li>
+ FastDbAppender
+ </li>
+ <li>
+ FireEventAppender
+ </li>
+ <li>
+ MessageBoxAppender
+ </li>
+ <li>
+ MessageObjectExpanderAppender
+ </li>
+ <li>
+ MsmqAppender
+ </li>
+ <li>
+ PatternFileAppender
+ </li>
+ <li>
+ SimpleSmtpAppender
+ </li>
+ </ul>
+ <p>
+ This example is available for the following platforms and languages. If a version
+ is not available for your chosen platform and language combination then select the
+ nearest platform for the appropriate language.
+ </p>
+ <ul>
+ <li>
+ <b>.NET 1.0</b>:
+ C#
+ </li>
+ </ul>
+ <p>
+ To run this example execute <span class="code">SampleAppendersApp.exe</span> from the build output directory.
+ </p>
+ </section>
+
+ <section id="samplelayouts" name="SampleLayouts">
+ <p>
+ This project includes the following example layouts.
+ </p>
+ <ul>
+ <li>
+ ForwardingLayout
+ </li>
+ <li>
+ LineWrappingLayout
+ </li>
+ </ul>
+ <p>
+ This example is available for the following platforms and languages. If a version
+ is not available for your chosen platform and language combination then select the
+ nearest platform for the appropriate language.
+ </p>
+ <ul>
+ <li>
+ <b>.NET 1.0</b>:
+ C#
+ </li>
+ </ul>
+ <p>
+ To run this example execute <span class="code">SampleLayoutsApp.exe</span> from the build output directory.
+ </p>
+ </section>
+
+ <section id="perf-notlogging" name="Performance - NotLogging">
+ <p>
+ The NotLogging example benchmarks the performance of log4net logging statements in
+ user code in various scenarios including when logging is disabled.
+ </p>
+ <p>
+ This example is available for the following platforms and languages. If a version
+ is not available for your chosen platform and language combination then select the
+ nearest platform for the appropriate language.
+ </p>
+ <ul>
+ <li>
+ <b>MONO 1.0</b>:
+ C#
+ </li>
+ <li>
+ <b>.NET 1.0</b>:
+ C#,
+ VB
+ </li>
+ </ul>
+ <p>
+ </p>
+ </section>
+
+ <section id="wmiappender" name="WmiAppender">
+ <p>
+ The WmiAppender sample shows an example appender that fires events through
+ Windows Management Instrumentation.
+ </p>
+ <p>
+ This example is available for the following platforms and languages. If a version
+ is not available for your chosen platform and language combination then select the
+ nearest platform for the appropriate language.
+ </p>
+ <ul>
+ <li>
+ <b>.NET 1.0</b>:
+ C#
+ </li>
+ </ul>
+ <p>
+ </p>
+ </section>
+
+ </section>
+
+ </section>
+ </body>
+</document>
diff --git a/src/site/xdoc/release/faq.xml b/src/site/xdoc/release/faq.xml
new file mode 100644
index 0000000..c23931e
--- /dev/null
+++ b/src/site/xdoc/release/faq.xml
@@ -0,0 +1,1245 @@
+<?xml version="1.0" ?>
+<!--
+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.
+-->
+<document>
+
+ <properties>
+ <author email="nicko at apache dot org">Nicko Cadell</author>
+ <title>Apache log4net: Frequently Asked Questions</title>
+ </properties>
+
+ <meta name="keywords" content="log4net frequently asked questions, log4net faq, log4net" />
+
+ <body>
+ <a name="top">
+ </a>
+ <section id="main" name="Apache log4net™ Frequently Asked Questions">
+ <section id="information" name="Information">
+
+ <section id="what-is-log4net" name="What is log4net?">
+ <p>
+ log4net is a tool to help the programmer output log statements to a variety of
+ output targets.
+ </p>
+ <p>
+ In case of problems with an application, it is helpful to enable logging so
+ that the problem can be located. With log4net it is possible to enable logging at
+ runtime without modifying the application binary. The log4net package is designed
+ so that log statements can remain in <i>production</i> code without incurring a
+ high performance cost. It follows that the speed of logging (or rather not
+ logging) is crucial.
+ </p>
+ <p>
+ At the same time, log output can be so voluminous that it quickly becomes
+ overwhelming. One of the distinctive features of log4net (and common to all of
+ the log4x libraries) is the notion of <i>hierarchical
+ loggers</i>. Using these loggers it is possible to selectively control
+ which log statements are output at arbitrary granularity.
+ </p>
+ <p>
+ log4net is designed with two distinct goals in mind: speed and flexibility. There
+ is a tight balance between these two requirements.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="reliability" name="Is log4net a reliable logging system?">
+ <p>
+ No. log4net is not reliable. It is a best-effort and <em>fail-stop</em> logging system.
+ </p>
+ <p>
+ By fail-stop, we mean that log4net will not throw unexpected exceptions at
+ run-time potentially causing your application to crash. <b>If for any reason, log4net
+ throws an uncaught exception</b> (except for <span class="code">ArgumentException</span> and
+ <span class="code">ArgumentNullException</span> which may be thrown), <b>please send an email
+ to the <a href="mailto:log4net-user@logging.apache.org">
+ log4net-user@logging.apache.org</a> mailing list</b>. Uncaught exceptions
+ are handled as serious bugs requiring immediate attention.
+ </p>
+ <p>
+ Moreover, log4net will not revert to <span class="code">System.Console.Out</span>
+ or <span class="code">System.Console.Error</span> when its designated
+ output stream is not opened, is not writable or becomes full. This avoids
+ corrupting an otherwise working program by flooding the user's terminal because
+ logging fails. However, log4net will output a single message to
+ <span class="code">System.Console.Error</span> and <span>System.Diagnostics.Trace</span>
+ indicating that logging can not be performed.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="prerequisites" name="What are the prerequisites for log4net?">
+ <p>
+ log4net runs on many different frameworks and each framework has its own requirements.
+ As a rule of thumb you will need an ECMA-335 compliant CLI runtime, for example,
+ the Microsoft® .NET runtime 1.0 (1.0.3705) or 1.1 (1.1.4322).
+ </p>
+ <p>
+ Not all frameworks are created equal and some features have been excluded from
+ some of the builds. See the <a href="framework-support.html">Framework Support</a>
+ document for more information.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="examples" name="Is there example code for using log4net?">
+ <p>
+ There is a directory containing examples in <span class="code">log4net\examples</span>.
+ The examples are broken down by framework.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="features" name="What are the features of log4net?">
+ <ul>
+ <li>
+ log4net is optimized for speed.</li>
+ <li>
+ log4net is based on a named logger hierarchy.</li>
+ <li>
+ log4net is fail-stop but not reliable.</li>
+ <li>
+ log4net is thread-safe.</li>
+ <li>
+ log4net is not restricted to a predefined set of facilities.</li>
+ <li>
+ Logging behavior can be set at runtime using a configuration file.
+ Configuration files are in XML format.</li>
+ <li>
+ log4net is designed to handle exceptions from the start.</li>
+ <li>
+ log4net can direct its output to many sinks including: a file, the console, the NT EventLog or even e-mail.</li>
+ <li>
+ log4net categorizes logging into levels: DEBUG, INFO, WARN, ERROR and FATAL.</li>
+ <li>
+ The format of the log output can be easily changed by implementing a new layout class.</li>
+ <li>
+ The target of the log output as well as the writing strategy can be altered by
+ writing a new appender class.</li>
+ <li>
+ log4net supports multiple output appenders per logger.</li>
+ </ul>
+ <p>
+ See the <a href="features.html">features</a> overview document for more information on the features of log4net.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="thread-safe" name="Is log4net thread-safe?">
+ <p>
+ Yes, log4net is thread-safe.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="output" name="What does log output look like?">
+ <p>
+ The log output can be customized in many ways. Moreover, one can completely
+ override the output format by implementing one's own <span class="code">ILayout</span>
+ </p>
+ <p>
+ Here is an example output using <span class="code">PatternLayout</span> with the conversion
+ pattern <span class="code">%timestamp [%thread] %-5level %logger{2} %ndc - %message%newline</span>
+ </p>
+ <source language="text"><![CDATA[
+176 [main] INFO examples.Sort - Populating an array of 2 elements in reverse order.
+225 [main] INFO examples.SortAlgo - Entered the sort method.
+262 [main] DEBUG SortAlgo.OUTER i=1 - Outer loop.
+276 [main] DEBUG SortAlgo.SWAP i=1 j=0 - Swapping intArray[0] = 1 and intArray[1] = 0
+290 [main] DEBUG SortAlgo.OUTER i=0 - Outer loop.
+304 [main] INFO SortAlgo.DUMP - Dump of integer array:
+317 [main] INFO SortAlgo.DUMP - Element [0] = 0
+331 [main] INFO SortAlgo.DUMP - Element [1] = 1
+343 [main] INFO examples.Sort - The next log statement should be an error message.
+346 [main] ERROR SortAlgo.DUMP - Tried to dump an uninitialized array.
+467 [main] INFO examples.Sort - Exiting main method.]]></source>
+ <p>
+ The first field is the number of milliseconds elapsed since the start of the
+ program. The second field is the thread outputting the log statement. The third
+ field is the level of the log statement. The fourth field is the rightmost
+ two components of the name of the logger making the log request. The fifth field (just
+ before the '-') is the <em>nested diagnostic context</em> (<span class="code">NDC</span>). Note the
+ nested diagnostic context may be empty as in the first two statements. The text
+ after the '-' is the message of the statement.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="loggers" name="What are Loggers?">
+ <p>
+ The logger concept lies at the heart of log4net's configuration. Loggers are organized into a
+ hierarchy and give the programmer <em>run-time</em> control on which logging statements
+ are printed or not.
+ </p>
+ <p>
+ Loggers are assigned levels through the configuration of log4net. A log statement is
+ routed through to the appender depending on its level <em>and</em> its logger.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="contributing" name="Why should I donate my extensions to log4net back to the project?">
+ <p>
+ Contrary to the GNU Public License (GPL) the Apache Software License does not
+ make any claims over your extensions. By extensions, we mean totally new code
+ that invokes existing log4net code. <em>You are free to do whatever you wish with
+ your proprietary log4net extensions.</em> In particular, you may choose to
+ never release your extensions to the wider public. For details see the
+ <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+ </p>
+ <p>
+ We are very careful not to unnecessarily change the log4net client API so that newer log4net
+ releases are backward compatible with previous versions. We are a lot less
+ scrupulous with the internal log4net API. Thus, if your extension is designed to
+ work with the internals of a specific log4net version, then when the next release
+ of log4net comes out, you will probably need to adapt your proprietary extensions to the
+ new release. Thus, you will be forced to spend precious resources in order to
+ keep up with log4net changes. This is commonly referred to as the "stupid-tax".
+ By donating the code and making it part of the standard distribution, you save
+ yourself the unnecessary maintenance work.
+ </p>
+ <p>
+ If your extensions are useful then someone will eventually write an extension
+ providing the same or very similar functionality. Your development effort will
+ be wasted.
+ </p>
+ <p>
+ Unless the proprietary log4net extension is business critical, there is little
+ reason for not donating your extensions back to the project.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="contributing-guidelines" name="What should I keep in mind when contributing code?">
+ <ol>
+ <li>
+ Stick to the existing indentation style even if you hate it.
+ <p>
+ Alternating between indentation styles makes it hard to understand the source
+ code. Make it hard on yourself but easier on others.
+ </p>
+ </li>
+ <li>
+ <b>Thoroughly test your code.</b>
+ <p>
+ There is nothing more irritating than finding the bugs in debugging (i.e. logging) code.
+ </p>
+ </li>
+ <li>
+ Keep it simple, small and fast.
+ <p>
+ It's all about the application not about logging.
+ </p>
+ </li>
+ <li>
+ Did I mention sticking with the indentation style?</li>
+ </ol>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="history" name="What is the history of log4net?">
+ <p>
+ log4net is a port of the popular <a href="http://logging.apache.org/log4j/">Apache log4j™</a> logging library.
+ The initial port was done in June 2001, since then we have tried to remain in the
+ spirit of the original log4j. See the log4net <a href="../history.html">history</a> page for more details.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="download" name="Where can I find the latest distribution of log4net?">
+ <p>
+ The log4net <a href="http://logging.apache.org/log4net/">home page</a> is a good place to start.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+ <section id="two-snks"
+ name="Why are there two different strong name keys?">
+ <p>
+ Starting with log4net 1.2.11 there are two
+ different binary distributions,
+ <code>oldkey</code> and <code>newkey</code>.
+ </p>
+
+ <p>
+ The <code>oldkey</code> distribution contains
+ assemblies signed with the same strong name key
+ that was used to sign the assemblies of log4net
+ 1.2.10 and earlier. This strong name key is only
+ available to log4net developers.
+ </p>
+
+ <p>
+ The <code>newkey</code> distribution contains
+ assemblies signed with the strong name key
+ available from <a
+ href="https://svn.apache.org/repos/asf/logging/log4net/trunk/log4net.snk">log4net's
+ svn area</a> or inside the source distribution.
+ Everybody can create assemblies that have the same
+ strong name.
+ </p>
+
+ <p>
+ For open source projects it is important that you
+ can create your own patched version of a product
+ and use it instead of the official release. This
+ is something that is now possible if the
+ <code>newkey</code> is used throughout.
+ </p>
+
+ <p>
+ The <code>oldkey</code> distribution is mostly
+ only for people who work with third-party
+ dependencies that require one of the earlier
+ releases of log4net and can't be recompiled to use
+ the new strong name. If you start a new project
+ or can recompile all your dependencies we strongly
+ recommend you use the <code>newkey</code>
+ assemblies.
+ </p>
+
+ <p>
+ If you are creating an assembly that is likely to
+ be combined with other assemblies that depend on
+ the old strong name, then it is better you use the
+ oldkey assemblies as well.
+ </p>
+
+ <p>
+ We currently plan to distribute the new-key
+ assembly under a different name while providing
+ old and newkey <code>log4net.dll</code> assemblies
+ holding type forwards to the new assembly. This
+ may create a cleaner migration path for projects
+ that have dependencies using both versions.
+ At the moment such projects will either need to
+ use the GAC or create sub-directories inside the
+ application directory and configure assembly
+ probing with a <code>privatePath</code>.
+ </p>
+
+ <p>
+ Note that the "new" strong name no longer provides
+ any kind of authenticity. If you want to be sure
+ you have the "real" Apache log4net, download the binary
+ release from one of the mirrors and verify the PGP
+ signature.
+ </p>
+
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+ </section>
+
+ <section id="configuration" name="Configuration">
+
+ <section id="dynamic" name="How can I change log behavior at runtime?">
+ <p>
+ Logging behavior can be set using configuration files which are parsed at runtime.
+ Using configuration files the programmer can define loggers and set their
+ levels.
+ </p>
+ <p>
+ Configuration files are specified in XML. See <span class="code">log4net.Config.XmlConfigurator</span>
+ for more details.
+ </p>
+ <p>
+ See the various <span class="code">log4net.Layout</span> and <span class="code">log4net.Appender</span>
+ components for specific configuration options.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="runtime-disable" name="How do I completely disable all logging at runtime?">
+ <p>
+ Setting the <span class="code">Threshold</span> on the Hierarchy to Level OFF will disable all
+ logging from that Hierarchy. This can be done in the log4net configuration file
+ by setting the "threshold" attribute on the log4net configuration element to "OFF".
+ For example:
+ </p>
+ <source language="xml"><![CDATA[
+<log4net threshold="OFF" />]]></source>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+ <section id="appender-options" name="What are the configurable options for an appender?">
+ <p>
+ log4net uses public properties to configure components such as
+ Appenders, Layouts, Loggers etc.
+ </p>
+ <p>
+ Thus, any writable public property in on the appender corresponds to a
+ configurable option. For example, in <span class="code">RollingFileAppender</span> the
+ <span class="code">public int MaxSizeRollBackups { set; }</span> property corresponds to
+ the <span class="code">MaxSizeRollBackups</span> option.
+ </p>
+ <p>
+ Layouts options are also defined by their writable properties. Same goes for most
+ other log4net components.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="appender-level" name="Is it possible to direct log output to different appenders by level?">
+ <p>
+ Yes it is. Setting the <span class="code">Threshold</span> option of any appender extending
+ <span class="code">AppenderSkeleton</span>, (most log4net appenders extend
+ <span class="code">AppenderSkeleton</span>) will filter out all log events
+ with a <em>lower</em> level than the value of the threshold option.
+ </p>
+ <p>
+ For example, setting the threshold of an appender to DEBUG will also allow INFO,
+ WARN, ERROR and FATAL messages to log along with DEBUG messages. (DEBUG is the
+ lowest level). This is usually acceptable as there is little use for DEBUG
+ messages without the surrounding INFO, WARN, ERROR and FATAL messages.
+ Similarly, setting the threshold of an appender to ERROR will filter out DEBUG,
+ INFO and WARN messages but not ERROR or FATAL messages.
+ </p>
+ <p>
+ This policy usually best encapsulates what the user actually wants to do, as
+ opposed to her mind-projected solution.
+ </p>
+ <p>
+ If you must filter events by exact level match, then you can attach a
+ <span class="code">LevelMatchFilter</span> to any appender to filter out logging
+ events by exact level match.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="config-reload" name="Is there a way to get log4net to automatically reload a configuration file if it changes?">
+ <p>
+ Yes. The <span class="code">XmlConfigurator</span> supports automatic
+ reloading through the <span class="code">ConfigureAndWatch</span> APIs. See the API
+ documentation for more details.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="appender-assembly" name="Can I load an appender from another assembly?">
+ <p>
+ Yes. When specifying the type in the configuration file you can give the assembly
+ qualified name of the type. For example:
+ </p>
+ <source language="xml"><![CDATA[
+<appender name="..." type="MyNamespace.MyAppender, MyAssembly">]]></source>
+ <p>
+ The .NET runtime will try to locate the assembly called <i>MyAssembly</i>.
+ How .NET locates assemblies is beyond the scope of this FAQ.
+ </p>
+ <p>
+ When loading an assembly from the GAC the fully qualified assembly name,
+ including the version, culture and public key must be specified. This is
+ in the standard syntax supported by <span class="code">System.Type.GetType</span>.
+ See the next FAQ on how to get the version and public key for an assembly.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="assembly-public-key" name="How do I get the Public Key for an assembly?">
+ <p>
+ The fully qualified name for an assembly includes the version, culture and
+ public key. The public key is derived from the strong name used to identify
+ the publisher. When referencing an assembly from the GAC the fully qualified
+ name must be used. To get the version, culture and public key you can use a
+ tool like the excellent .NET Reflector from Lutz Roeder available from
+ <a href="http://www.aisto.com/roeder/dotnet">http://www.aisto.com/roeder/dotnet</a>.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="layout-header-xml-newlines" name="How do I insert newlines into the layout header?">
+ <p>
+ Newlines in the config file need to be escaped using an XML numeric character reference.
+ The sequence that represents a CR LF is &#13; &#10;. The following example adds
+ a header and footer to the output each followed by a newline.
+ </p>
+ <source language="xml"><![CDATA[
+<layout type="log4net.Layout.PatternLayout">
+ <header value="[Header] " />
+ <footer value="[Footer] " />
+ <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
+</layout>]]></source>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="pattern-string" name="How do I use a pattern to set the value of a string property?">
+ <p>
+ Log4net supports a pattern syntax for setting string properties similar to the
+ <span class="code">PatternLayout</span> used to format the output messages.
+ This pattern syntax can be used by specifying <span class="code">type="log4net.Util.PatternString"</span>
+ on the string property in the config file. This tells the config parser to pass the
+ value to the <span class="code">PatternString</span> type before converting the result
+ to a string. For details on the patterns supported see the <a href="sdk/html/T_log4net_Util_PatternString.htm">
+ PatternString SDK Reference</a>.
+ </p>
+ <p>
+ The following example sets the file name for a <span class="code">FileAppender</span> to include the
+ current process id by specifying the <span class="code">%processid</span> pattern in the
+ <span class="code">File</span> property.
+ </p>
+ <source language="xml"><![CDATA[
+<appender name="LogFileAppender" type="log4net.Appender.FileAppender">
+ <file type="log4net.Util.PatternString" value="log-file-[%processid].txt" />
+ <layout type="log4net.Layout.PatternLayout" value="%date [%thread] %-5level %logger - %message%newline" />
+</appender>]]></source>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ </section>
+
+ <section id="implementing" name="Implementing Logging">
+
+ <section id="naming" name="Are there any suggested ways for naming loggers?">
+ <p>
+ Yes, there are.
+ </p>
+ <p>
+ You can name logging loggers by <strong>locality</strong>. It turns out that
+ instantiating a logger in each class, with the logger name equal to the
+ fully-qualified name of the class, is a useful and straightforward approach of
+ defining loggers. This approach has many benefits:
+ </p>
+ <ul>
+ <li>
+ It is very simple to implement.</li>
+ <li>
+ It is very simple to explain to new developers.</li>
+ <li>
+ It automatically mirrors your application's own modular design.</li>
+ <li>
+ It can be further refined at will.</li>
+ <li>
+ Printing the logger automatically gives information on the locality of the
+ log statement.</li>
+ </ul>
+ <p>
+ However, this is not the only way for naming loggers. A common alternative
+ is to name loggers by <strong>functional areas</strong>. For example, the
+ "database" logger, "remoting" logger, "security" logger, or the "XML"
+ logger.
+ </p>
+ <p>
+ You may choose to name loggers by functionality and subcategorize by
+ locality, as in "DATABASE.MyApp.MyClass" or
+ "DATABASE.MyApp.MyModule.MyOtherClass".
+ </p>
+ <p>
+ <em>You are totally free in choosing the names of your loggers.</em> The
+ log4net package merely allows you to manage your names in a hierarchy. However,
+ it is your responsibility to define this hierarchy.
+ </p>
+ <p>
+ <b>Note:</b> by naming loggers by locality one tends to name things by
+ functionality, since in most cases the locality relates closely to
+ functionality.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="static-class-name" name="How do I get the fully-qualified name of a class in a static block?">
+ <p>
+ You can easily retrieve the fully-qualified name of a class in a static block
+ for class <span class="code">X</span>, with the statement <span class="code">typeof(X).Name</span>.
+ Note that <span class="code">X</span> is the class name and span an instance.
+ However because the <span class="code">LogManager.GetLogger</span> method is overloaded
+ to take an instance of <span class="code">Type</span> as well as <span class="code">string</span>
+ usually only the type of the class is required.
+ </p>
+ <p>
+ Here is the suggested usage template:
+ </p>
+ <source language="C#"><![CDATA[
+public class Foo
+{
+ private static readonly ILog log = LogManager.GetLogger(typeof(Foo));
+ ... other code
+}]]></source>
+ <p>
+ An equivalent and more portable solution, though slightly longer, is to use the declaring type
+ of the static constructor.
+ </p>
+ <source language="C#"><![CDATA[
+public class Foo
+{
+ private static readonly ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+ ... other code
+}]]></source>
+ <p>
+ <b>Note:</b> the .NET Compact Framework 1.0 does not support <span class="code">System.Reflection.MethodBase.GetCurrentMethod()</span>.
+ </p>
+
+ <p>
+ <b>Note:</b> the two forms are only equivalent
+ if <span class="code">Foo</span> is not a
+ generic class. For a generic class <span
+ class="code">Foo<T></span> the variant
+ using <span class="code">typeof</span> generates
+ a different logger for each different type
+ parameter <span class="code">T</span> while the
+ variant using reflection generates the same
+ logger for all <span class="code">T</span>s.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="perf-not-logging" name="What is the fastest way of (not) logging?">
+ <p>
+ For some logger <span class="code">log</span>, writing,
+ </p>
+ <source language="C#"><![CDATA[
+log.Debug("Entry number: " + i + " is " + entry[i]);]]></source>
+ <p>
+ incurs the cost of constructing the message parameter, that is converting both
+ integer <span class="code">i</span> and <span class="code">entry[i]</span> to
+ a string, and concatenating intermediate strings. This, regardless of whether
+ the message will be logged or not.
+ </p>
+ <p>
+ If you are worried about speed, then write
+ </p>
+ <source language="C#"><![CDATA[
+if(log.IsDebugEnabled)
+{
+ log.Debug("Entry number: " + i + " is " + entry[i]);
+}]]></source>
+ <p>
+ This way you will not incur the cost of parameter construction if debugging is
+ disabled for logger <span class="code">log</span>. On the other hand, if the logger is
+ debug enabled, you will incur the cost of evaluating whether the logger is
+ enabled or not, twice: once in <span class="code">IsDebugEnabled</span> and once in <span class="code">Debug</span>.
+ This is an insignificant overhead since evaluating a logger takes less than
+ 1% of the time it takes to actually log a statement.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="perf-not-logging2" name="What is REALLY the FASTEST way of (not) logging?">
+ <p>
+ So you don't think that the previous FAQ is really the fastest way
+ of not logging? Well there is a faster way but it does have some
+ drawbacks. Starting from:
+ </p>
+ <source language="C#"><![CDATA[
+if(log.IsDebugEnabled)
+{
+ log.Debug("Entry number: " + i + " is " + entry[i]);
+}]]></source>
+ <p>
+ It is possible to further eliminate the calls to <span class="code">IsDebugEnabled</span>
+ so that the call is only made once per logger. If you are using one logger
+ for each class then you can store the enabled state for the logger in a static
+ variable in the class and then test against this variable:
+ </p>
+ <source language="C#"><![CDATA[
+public class FastLogger
+{
+ private static readonly ILog log = LogManager.GetLogger(typeof(FastLogger));
+ private static readonly bool isDebugEnabled = log.IsDebugEnabled;
+
+ public void MyMethod()
+ {
+ if(isDebugEnabled)
+ {
+ log.Debug("Entry number: " + i + " is " + entry[i]);
+ }
+ }
+}]]></source>
+ <p>
+ So why exactly is this faster? Well to start with the <span class="code">IsDebugEnabled</span>
+ is not called for each log statement, it is called once per logger. Furthermore as the
+ <span class="code">isDebugEnabled</span> variable is <span class="code">private static readonly</span>
+ the JIT compiler can at <em>run-time</em> optimize out the <span class="code">if</span> test altogether.
+ This means that at runtime the JIT compiler won't even compile the logging statements into native code, i.e.
+ all the logging just disappears.
+ </p>
+ <p>
+ So what is the downside to using this? Well one of the clever features of log4net is that
+ you can change the logging configuration while your program is running. If you need to
+ investigate an issue in your application, you don't have to stop the application, setup the
+ logging and restart the application, you can change the logging configuration and the
+ log4net will reload it (see <span class="code">XmlConfigurator.ConfigureAndWatch</span> APIs for more
+ information). However if the JIT has compiled out all of the logging statements
+ then they are gone and you can't get them back by reloading the configuration file. Effectively
+ this means that the logging configuration can only be set when the application loads and
+ it cannot be changed at runtime. It is up to you to decide if you need ultimate speed or need
+ to be able to reload the logging configuration while the application is running.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="multiple-files" name="Can the outputs of multiple client request go to different log files?">
+ <p>
+ Many developers are confronted with the problem of distinguishing the log
+ output originating from the same class but different client requests. They come
+ up with ingenious mechanisms to fan out the log output to different files. In
+ most cases, this is not the right approach.
+ </p>
+ <p>
+ It is simpler to use a context property or stack (<span class="code">ThreadContext</span>).
+ Typically, one would <span class="code">ThreadContext.Properties["ID"] = "XXX"</span>
+ client specific information, such as the client's hostname, ID or any other
+ distinguishing information when starting to handle the client's request.
+ Thereafter, log output will automatically include the context data
+ so that you can distinguish logs from different client requests even if they
+ are output to the same file.
+ </p>
+ <p>
+ See the <span class="code">ThreadContext</span> and the <span class="code">PatternLayout</span> classes for more
+ information.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="remove-logger" name="Logger instances seem to be create only. Why isn't there a method to remove logger instances?">
+ <p>
+ It is quite nontrivial to define the semantics of a "removed" logger which is
+ still referenced by the user.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="single-file" name="How do I get multiple process to log to the same file?">
+ <p>
+ Before you even start trying any of the
+ alternatives provided, ask yourself whether you
+ really need to have multiple processes log to the
+ same file, then don't do it ;-).
+ </p>
+
+ <p>
+ FileAppender offers pluggable locking models for
+ this usecase but all existing implementations have
+ issues and drawbacks.
+ </p>
+
+ <p>
+ By default the <span
+ class="code">FileAppender</span> holds an
+ exclusive write lock on the log file while it
+ is logging. This prevents other processes from
+ writing to the file. This model is known to
+ break down with (at least on some versions of)
+ Mono on Linux and log files may get corrupted
+ as soon as another process tries to access the
+ log file.
+ </p>
+
+ <p>
+ <span class="code">MinimalLock</span> only
+ acquires the write lock while a log is being
+ written. This allows multiple processes to
+ interleave writes to the same file, albeit with
+ a considerable loss in performance.
+ </p>
+ <p>
+ <span class="code">InterProcessLock</span>
+ doesn't lock the file at all but synchronizes
+ using a system wide Mutex. This will only work
+ if all processes cooperate (and use the same
+ locking model). The acquisition and release of a
+ Mutex for every log entry to be written will
+ result in a loss of performance, but the Mutex
+ is preferable to the use of MinimalLock.
+ </p>
+ <p>
+ If you use <span
+ class="code">RollingFileAppender</span> things
+ become even worse as several process may try to
+ start rolling the log file concurrently. <span
+ class="code">RollingFileAppender</span>
+ completely ignores the locking model when
+ rolling files, rolling files is simply not
+ compatible with this scenario.
+ </p>
+ <p>
+ A better alternative is to have your processes
+ log to <span
+ class="code">RemotingAppenders</span>. Using
+ the <span
+ class="code">RemoteLoggingServerPlugin</span>
+ (or <span
+ class="code">IRemoteLoggingSink</span>) a
+ process can receive all the events and log
+ them to a single log file. One of the
+ examples shows how to use the <span
+ class="code">RemoteLoggingServerPlugin</span>.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="distributed" name="If I have many processes across multiple hosts (possibly across multiple time zones) logging to the same file using the RemotingAppender, what happens to timestamps?">
+ <p>
+ The timestamp is created when the logging event is created. That is so say,
+ when the <span class="code">Debug</span>, <span class="code">Info</span>,
+ <span class="code">Warn</span>, <span class="code">Error</span>
+ or <span class="code">Fatal</span> method is invoked. This is unaffected by the time at
+ which they may arrive at a remote server. Since the timestamps are
+ transmitted in UTC format by the <span class="code">RemotingAppender</span>,
+ they all appear in the same time zone as
+ the host creating the logfile. Since the clocks of various machines may not be
+ synchronized, this may account for time interval inconsistencies between events
+ generated on different hosts.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="first-log" name="When should I log my first message?">
+ <p>
+ The simple answer is as soon as possible. The long answer is more complex.
+ </p>
+ <p>
+ If you are configuring log4net programmatically, i.e. by calling the
+ <span class="code">XmlConfigurator.Configure</span> method then you should do so
+ before you begin logging and it is reasonable to do this very soon after application
+ start.
+ </p>
+ <p>
+ If you are configuring log4net by specifying assembly level attributes on
+ your assembly then the configuration will be loaded once the first call to
+ the <span class="code">LogManager.GetLogger</span> is made. It is necessary
+ that the first call to <span class="code">LogManager.GetLogger</span> made
+ during the process (or AppDomain) is made from the assembly that has the
+ configuration attributes. Log4net will look only once and only on the first
+ calling assembly for the configuration attributes.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ </section>
+
+ <section id="customization" name="Customization">
+
+ <section id="custom-output" name="Can the log output format be customized?">
+ <p>
+ Yes. You can implement the <span class="code">log4net.Layout.ILayout</span>
+ interface to create you own customized log format, or you can extend the
+ <span class="code">LayoutSkeleton</span> class which provides a default
+ implementation of the <span class="code">ILayout</span> interface.
+ Appenders can be parameterized to use the layout of your choice.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="custom-appender" name="Can I write a custom appender?">
+ <p>
+ Yes. You can implement the <span class="code">log4net.Appender.IAppender</span>
+ interface to create you own customized appender. We recommend that you extend the
+ <span class="code">log4net.Appender.AppenderSkeleton</span> class rather than
+ starting from scratch. You should implement your custom code in a assembly
+ separate from the log4net assembly. To get started it is worth looking at the
+ source of the <span class="code">log4net.Appender.TraceAppender</span> as an
+ example of the minimum amount of code required to get an appender working.
+ </p>
+ <p>
+ To configure log4net to use your custom appender you need to specify the
+ assembly qualified name of the appender type in the config file. For
+ example:
+ </p>
+ <source language="xml"><![CDATA[
+<appender name="..." type="MyNamespace.MyAppender, MyAssembly">]]></source>
+ <p>
+ The .NET runtime will try to locate the assembly called <i>MyAssembly</i>.
+ How .NET locates assemblies is beyond the scope of this FAQ.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+ </section>
+
+ <section id="troubleshooting" name="Troubleshooting">
+
+ <section id="internalDebug" name="How do I enable log4net internal debugging?">
+ <p>
+ There are 2 different ways to enable internal debugging in log4net.
+ These are listed below. The preferred method is to specify
+ the <span class="code">log4net.Internal.Debug</span> option in the application's
+ config file.
+ </p>
+ <ul>
+ <li>
+ <p>
+ Internal debugging can also be enabled by setting a value in the application's
+ configuration file (not the log4net configuration file, unless the log4net config
+ data is embedded in the application's config file). The <span class="code">log4net.Internal.Debug</span>
+ application setting must be set to the value <span class="code">true</span>.
+ For example:
+ </p>
+ <div class="syntax"><pre class="code">
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <appSettings>
+ <add key="log4net.Internal.Debug" value="true"/>
+ </appSettings>
+</configuration></pre></div>
+ <p>
+ This setting is read immediately on startup an will cause all internal
+ debugging messages to be emitted.
+ </p>
+ </li>
+ <li>
+ <p>
+ To enable log4net's internal debug programmatically you need
+ to set the <span class="code">log4net.Util.LogLog.InternalDebugging</span>
+ property to <span class="code">true</span>. Obviously the sooner this
+ is set the more debug will be produced.
+ </p>
+ </li>
+ </ul>
+ <p>
+ Internal debugging messages are written to the console and to the
+ <span class="code">System.Diagnostics.Trace</span>
+ system. If the application does not have a console the messages logged
+ there will be lost. Note that an application can redirect the console
+ stream by setting the <span class="code">System.Console.Out</span>. The
+ Trace system will by default send the message to an attached debugger
+ (where the messages will appear in the output window). If the process
+ does not have a debugger attached then the messages are sent to the
+ system debugger. A utility like DebugView from
+ <a href="http://www.sysinternals.com">http://www.sysinternals.com</a>
+ may be used to capture these messages.
+ </p>
+ <p>
+ As log4net internal debug messages are written to the <span class="code">System.Diagnostics.Trace</span>
+ system it is possible to redirect those messages to a local file. You can define
+ a trace listener by adding the following to your application's .config file:
+ </p>
+ <div class="syntax"><pre class="code">
+<configuration>
+ ...
+
+ <system.diagnostics>
+ <trace autoflush="true">
+ <listeners>
+ <add
+ name="textWriterTraceListener"
+ type="System.Diagnostics.TextWriterTraceListener"
+ initializeData="C:\tmp\log4net.txt" />
+ </listeners>
+ </trace>
+ </system.diagnostics>
+
+ ...
+</configuration></pre></div>
+ <p>
+ Make sure that the process running your application has permission
+ to write to this file.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+ <section id="trouble-evaluate-configurationerrors-at-runtime" name="How can I evaluate configuration errors at runtime?">
+ <p>
+ To prevent silent failure of log4net as reported as <a href="http://issues.apache.org/jira/browse/LOG4NET-342">LOG4NET-342</a>,
+ log4net supports a way to evaluate if it was configured and also to evaluate messages generated on startup since 1.2.11. To
+ check if log4net was started and configured properly one can check the property
+ <span class="code">log4net.Repository.ILoggerRepository.Configured</span> and enumerate the configuration messages as follows:
+ </p>
+ <div class="syntax">
+ <pre class="code">
+if(!log4net.LogManager.GetRepository().Configured)
+{
+ // log4net not configured
+ foreach(log4net.Util.LogLog message in log4net.LogManager.GetRepository().ConfigurationMessages.Cast<log4net.Util.LogLog&bg;())
+ {
+ // evaluate configuration message
+ }
+}
+ </pre>
+ </div>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+ <section id="trouble-EventLog" name="Why doesn't the EventLogAppender work?">
+ <p>
+ If you are not getting events delivered to the event log this usually indicates
+ a permissions problem. Basically if the event log does not exist the EventLogAppender
+ tries to create it, but you need local administrator permissions to create event logs
+ (just to write into the right bit of the registry). You don't need administrator
+ permissions to log to an existing event log, but it must exist. If you are using the
+ event log from a web application or service using the event log can be a little tricky.
+ </p>
+ <p>
+ A web application will run as the user account ASPNET. This account deliberately has
+ few permissions to reduce the chances of someone hacking into the web server. While the
+ account has permission to write to the event log it does not have permission to create
+ event sources (registry create and write access), which are needed to write to the event log.
+ </p>
+ <p>
+ There are a couple of solutions:
+ </p>
+ <ol>
+ <li>
+ <p>
+ Make the ASPNET user a member of the Administrators group. This will work because the
+ user will then have the required permissions. This is <strong>not recommended</strong>
+ for production use.
+ </p>
+ </li>
+ <li>
+ <p>
+ As the event source only needs to be created once for the machine, create an installer
+ and configure it to create the event source.
+ The installer will need to be run as Administrator (don't they all). See
+ <span class="code">System.Diagnostics.EventLogInstaller</span> in the Microsoft .NET
+ Framework SDK for an example of how to create a simple event log installer.
+ </p>
+ </li>
+ </ol>
+ <p>
+ There is a Microsoft Knowledge Base article that covers this issue and how to resolve
+ it. <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;329291">
+ PRB: "Requested Registry Access Is Not Allowed" Error Message When ASP.NET
+ Application Tries to Write New EventSource in the EventLog</a>.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="trouble-file-perm" name="Why can't I log to a FileAppender from a web application?">
+ <p>
+ The web application runs as a special user account on the web server
+ called ASPNET. This account has restricted permissions to protect the
+ web server from attacks. By default this account may not have permission
+ to write to the file system. Make sure that the ASPNET account has
+ permission to create and write to files in the directory chosen for
+ logging.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="trouble-service" name="Why doesn't the logging in my service work?">
+ <p>
+ A windows service runs as a user account specified in the services
+ control panel. This account may have restricted permissions, make
+ sure that the account has permission to create and write to files
+ in the directory chosen for logging.
+ </p>
+ <p>
+ A windows service is launched by windows. The current directory in
+ a service is set to the windows system directory (e.g.
+ <span class="code">C:\Windows\System32</span>). If you are loading
+ the configuration file from the current directory then be aware
+ that this path will not be the location of your assemblies.
+ The best way to get the path to your assemblies is to use
+ <span class="code">AppDomain.BaseDirectory</span>.
+ Note that the log4net internals never use the current directory.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="trouble-webapp-stops-logging" name="Why does my ASP.NET web application stop logging when deployed on an IIS?">
+ <p>
+ This problem has been reported by several people as issue
+ <a href="https://issues.apache.org/jira/browse/LOG4NET-178">LOG4NET-178</a>.
+ The issue seems to be caused by a broken LOG4NET configuration
+ or a timing problem caused by an application shutdown event that
+ floats in late after an application start event and thus LOG4NET
+ stops logging immediately after it has been started.
+ </p>
+ <p>
+ The first thing step to troubleshoot problems is enabling
+ the log4net internal debugging features as described
+ <a href="http://logging.apache.org/log4net/release/faq.html#internalDebug">here</a>
+ and fix all errors that pop up. If the problem still persists,
+ <a href="https://issues.apache.org/jira/browse/LOG4NET-178?focusedCommentId=13504094&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13504094">this comment</a>
+ suggests to move the LOG4NET configuration out of the
+ <span class="code">web.config</span> into a separate file
+ like <span class="code">log4net.config</span>. Finally,
+ if both previous steps did not help and the problem still
+ occurs, you can try to work around the event timing problem
+ by invoking the configuration call from the class constructor as described in
+ <a href="https://issues.apache.org/jira/browse/LOG4NET-178?focusedCommentId=13504485&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13504485">this comment</a>.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="trouble-db" name="I am having trouble using the AdoNetAppender to connect to my database?">
+ <p>
+ For details on the different ways in which ADO.NET can connect to a database see:
+ <a href="http://msdn.microsoft.com/library/en-us/cpguide/html/cpconadonetconnections.asp">Connecting to a Data Source Using ADO.NET</a>.
+ </p>
+ <p>
+ If you need to use ODBC to connect to your database then please note that the
+ ADO.NET ODBC drivers are not included in the standard .NET framework redistributable.
+ You can download the drivers from microsoft download at:
+ <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6ccd8427-1017-4f33-a062-d165078e32b1">ODBC .NET Data Provider</a>.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+
+ <section id="report-bugs" name="How do I report bugs?">
+ <p>
+ First make sure it really is a bug and not a
+ usage error. When in doubt, ask on the <a
+ href="../mail-lists.html">log4net-user mailing
+ list</a> first.
+ </p>
+ <p>
+ If you have identified a bug, please report it
+ via our <a href="../issue-tracking.html">Issue
+ Tracker</a>. You may want to check it hasn't
+ been reported before by searching the existing
+ issues.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+ <section id="log-early"
+ name="log4net doesn't log when built in RELEASE mode">
+ <p>
+ If you use attributes to configure log4net then
+ the order by which assemblies are loaded may
+ determine whether you attributes are used or
+ not. Assembly load order may be different in
+ DEBUG and RELEASE mode.
+ </p>
+
+ <p>
+ As stated in <a
+ href="manual/configuration.html#attributes">the
+ manual</a> the attribute will only be read for
+ the first assembly that tries to use log4net.
+ So it is important that you obtain your
+ <code>ILog</code> instance as early as possible.
+ </p>
+
+ <p>
+ For a command line application "as early as
+ possible" probably is the class holding the
+ <code>Main</code> method, for a Web-Application
+ it would be your <code>Global.asax</code> class
+ and for a Windows Service it would be the class
+ deriving from <code>ServiceBase</code>.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+ <section id="no-explicit-configuration"
+ name="log4net doesn't log at all">
+ <p>
+ You may have overlooked initialization code for
+ log4net in your application. log4net can be
+ initialized explicitly by calling one of the
+ configurators
+ (e.g. <code>BasicConfigurator</code> or
+ <code>XmlConfigurator</code> in the
+ <code>log4net.Config</code> namespace, or
+ implicitly by including the
+ <code>[XmlConfiguratorAttribute]</code> in the
+ assembly where log4net is first used.
+ </p>
+
+ <p>
+ See <a href="manual/configuration.html">the
+ manual</a> for more information. If you use
+ attributes to configure log4net then the order
+ by which assemblies are loaded may determine
+ whether you attributes are used or not.
+ Assembly load order may be different in DEBUG
+ and RELEASE mode. See also <a
+ href="#log-early">log4net doesn't log when built
+ in RELEASE mode</a>.
+ </p>
+
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+ <section id="adonet-doesnt-reconnect"
+ name="The ADO.NET Appender doesn't reconnect
+ after a DB failure on .NET 4.5.1">
+ <p>
+ Starting with .NET 4.5.1 ADO.NET has added
+ connection resiliency which is supposed to
+ re-establish the connection as part if the
+ framework. As a result log4net doesn't know the
+ connection is broken and will never attempt to
+ re-establish the connection.
+ </p>
+ <p>
+ Unfortunately re-connecting doesn't seem to be
+ working reliably. A workaround may be to add
+ <code>ConnectRetryCount=0</code> to your
+ connection string.
+ </p>
+ <p>
+ For details see <a
+ href="https://issues.apache.org/jira/browse/LOG4NET-442">LOG4NET-442</a>
+ </p>
+ </section>
+ </section>
+
+ <section id="misc" name="Miscellaneous">
+
+ <section id="vsnet-add-reference" name="How do I make log4net appear in the Visual Studio Add References dialog?">
+ <p>
+ There is a good discussion of this topic on Robert McLaws blog:
+ <a href="http://weblogs.asp.net/rmclaws/archive/2003/11/15/37743.aspx">Building a Better Server Control Experience, Part 2</a>.
+ </p>
+ </section>
+
+ <section id="nuget" name="Do you provide a Nuget package?">
+ <p>
+ Starting with version 2.0.6 we provide <a
+ href="https://www.nuget.org/packages/log4net/"
+ rel="nofollow">Nuget packages</a>. For earlier
+ versions <a href="http://blog.cincura.net/"
+ rel="nofollow">Jiří Činčura</a> has kindly created
+ Nuget packages.
+ </p>
+ </section>
+ <p><a href="#top">Back to Top</a></p>
+
+ </section>
+
+ </section>
+
+ </body>
+</document>
diff --git a/src/site/xdoc/release/features.xml b/src/site/xdoc/release/features.xml
new file mode 100644
index 0000000..c42b723
--- /dev/null
+++ b/src/site/xdoc/release/features.xml
@@ -0,0 +1,314 @@
+<?xml version="1.0" ?>
+<!--
+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.
+-->
+<document>
+
+ <properties>
+ <author email="nicko at apache dot org">Nicko Cadell</author>
+ <title>Apache log4net: Features</title>
+ </properties>
+
+ <meta name="keywords" content="log4net features, log4net" />
+
+ <body>
+ <section id="main" name="Apache log4net™ Features">
+
+ <section id="overview" name="Overview">
+ <p>
+ log4net is a tool to help the programmer output log statements to a
+ variety of output targets. In case of problems with an application,
+ it is helpful to enable logging so that the problem can be located.
+ With log4net it is possible to enable logging at runtime without
+ modifying the application binary. The log4net package is designed so
+ that log statements can remain in shipped code without incurring a
+ high performance cost. It follows that the speed of logging (or
+ rather not logging) is crucial.
+ </p>
+ <p>
+ At the same time, log output can be so voluminous that it quickly becomes
+ overwhelming. One of the distinctive features of log4net is the notion of
+ hierarchical loggers. Using these loggers it is possible to selectively
+ control which log statements are output at arbitrary granularity.
+ </p>
+ <p>
+ log4net is designed with two distinct goals in mind: speed and flexibility
+ </p>
+ </section>
+
+ <section id="features" name="Features">
+ <ul>
+ <li>Support for multiple frameworks</li>
+ <li>Output to multiple logging targets</li>
+ <li>Hierarchical logging architecture</li>
+ <li>XML Configuration</li>
+ <li>Dynamic Configuration</li>
+ <li>Logging Context</li>
+ <li>Proven architecture</li>
+ <li>Modular and extensible design</li>
+ <li>High performance with flexibility</li>
+ </ul>
+ </section>
+
+ <section id="frameworks" name="Support for multiple frameworks">
+ <p>
+ log4net runs on all ECMA CLI 1.0 compatible runtimes.
+ log4net has specific builds for the following frameworks:
+ </p>
+ <ul>
+ <li>.NET Core 1.0 - using netstandard-1.3</li>
+ <li>Microsoft® .NET Framework 1.0<sup><a href="#no-bin-support">*</a></sup></li>
+ <li>Microsoft .NET Framework 1.1<sup><a href="#no-bin-support">*</a></sup></li>
+ <li>Microsoft .NET Framework 2.0</li>
+ <li>Microsoft .NET Framework 3.5</li>
+ <li>Microsoft .NET Framework 4.0</li>
+ <li>Microsoft .NET Framework 4.5</li>
+ <li>Microsoft .NET Framework 3.5 Client Profile</li>
+ <li>Microsoft .NET Framework 4.0 Client Profile</li>
+ <li>Microsoft .NET Compact Framework 1.0<sup><a href="#no-bin-support">*</a></sup></li>
+ <li>Microsoft .NET Compact Framework 2.0<sup><a href="#no-bin-support">*</a></sup></li>
+ <li>Mono 1.0<sup><a href="#no-bin-support">*</a></sup></li>
+ <li>Mono 2.0</li>
+ <li>Mono 3.5</li>
+ <li>Mono 4.0</li>
+ <li>Microsoft Shared Source CLI 1.0<sup><a href="#no-bin-support">*</a></sup></li>
+ <li>CLI 1.0 Compatible<sup><a href="#no-bin-support">*</a></sup></li>
+ </ul>
+ <p>The "Client Profile" builds are stripped down
+ versions of the "normal" builds that don't contain any
+ ASP.NET releated code - which for example means the
+ <code>%aspnet-*</code> patterns and the
+ <code>AspNetTraceAppender</code> are not available.</p>
+
+ <p style="font-size:smaller">
+ <sup><a name="no-bin-support">*</a></sup>Not
+ supported by the binary release but can be built
+ from the source release.
+ </p>
+ </section>
+
+ <section id="appenders" name="Output to multiple logging targets">
+ <p>
+ log4net ships with the following appenders (not on all frameworks):
+ </p>
+ <div class="table">
+ <table cellspacing="0">
+ <tr>
+ <th>
+ Type</th>
+ <th>
+ Description</th>
+ </tr>
+ <tr>
+ <td>log4net.Appender.AdoNetAppender</td>
+ <td>
+ Writes logging events to a database using either prepared statements or stored
+ procedures.
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.AnsiColorTerminalAppender</td>
+ <td>
+ Writes color highlighted logging events to a an ANSI terminal window.
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.AspNetTraceAppender</td>
+ <td>
+ Writes logging events to the ASP trace context. These can then be rendered at
+ the end of the ASP page or on the ASP trace page.
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.ColoredConsoleAppender</td>
+ <td>
+ Writes color highlighted logging events to the application's Windows Console.
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.ConsoleAppender</td>
+ <td>
+ Writes logging events to the application's Console. The events may go to either
+ the standard our stream or the standard error stream.
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.DebugAppender</td>
+ <td>
+ Writes logging events to the .NET system.
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.EventLogAppender</td>
+ <td>
+ Writes logging events to the Windows Event Log.
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.FileAppender</td>
+ <td>
+ Writes logging events to a file in the file system.
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.LocalSyslogAppender</td>
+ <td>
+ Writes logging events to the local syslog service (UNIX only).
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.MemoryAppender</td>
+ <td>
+ Stores logging events in an in memory buffer.
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.NetSendAppender</td>
+ <td>
+ Writes logging events to the Windows Messenger service. These messages are
+ displayed in a dialog on a users terminal.
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.OutputDebugStringAppender</td>
+ <td>
+ Writes logging events to the debugger. If the application has no
+ debugger, the system debugger displays the string. If the application has no
+ debugger and the system debugger is not active, the message is ignored.
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.RemoteSyslogAppender</td>
+ <td>
+ Writes logging events to a remote syslog service using UDP networking.
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.RemotingAppender</td>
+ <td>
+ Writes logging events to a remoting sink using .NET remoting.
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.RollingFileAppender</td>
+ <td>
+ Writes logging events to a file in the file system. The RollingFileAppender can
+ be configured to log to multiple files based upon date or file size
+ constraints.
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.SmtpAppender</td>
+ <td>
+ Sends logging events to an email address.
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.SmtpPickupDirAppender</td>
+ <td>
+ Sends logging events to an email
+ address but writes the emails to a
+ configurable directory rather than
+ sending them directly via SMTP.
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.TelnetAppender</td>
+ <td>
+ Clients connect via Telnet to receive logging events.
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.TraceAppender</td>
+ <td>
+ Writes logging events to the .NET trace system.
+ </td>
+ </tr>
+ <tr>
+ <td>log4net.Appender.UdpAppender</td>
+ <td>
+ Sends logging events as connectionless UDP datagrams to a remote host or a
+ multicast group using a UdpClient.
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p>A special log4net.Appender.ForwardingAppender can
+ be used to wrap another appender, for example to
+ attach additional filters.</p>
+ </section>
+
+ <section id="hierarchy" name="Hierarchical logging architecture">
+ <p>
+ Hierarchical logging is an ideal fit with component based development.
+ Each component has its own of logger. When individually tested, the
+ properties of these loggers may be set as the developer requires.
+ When combined with other components, the loggers inherit the properties
+ determined by the integrator of the components. One can selectively elevate
+ logging priorities on one component without affecting the other components.
+ This is useful when you need a detailed trace from just a single component
+ without crowding the trace file with messages from other components. All
+ this can be done through configuration files; no code changes are required.
+ </p>
+ </section>
+
+ <section id="xml-config" name="XML Configuration">
+ <p>
+ log4net is configured using an XML configuration file. The configuration
+ information can be embedded within other XML configuration files
+ (such as the application's .config file) or in a separate file. The
+ configuration is easily readable and updateable while retaining the
+ flexibility to express all configurations.
+ </p>
+ <p>
+ Alternatively log4net can be configured programmatically.
+ </p>
+ </section>
+
+ <section id="dynamic-config" name="Dynamic Configuration">
+ <p>
+ log4net can monitor its configuration file for changes and dynamically
+ apply changes made by the configurator. The logging levels, appenders,
+ layouts, and just about everything else can be adjusted at runtime.
+ In many cases it is possible to diagnose application issues without
+ terminating the process in question. This can a very valuable tool in
+ investigating issues with deployed applications.
+ </p>
+ </section>
+
+ <section id="context" name="Logging Context">
+ <p>
+ log4net can be used to collect logging context data in a way that is transparent
+ to the developer at the point of logging. The GlobalContext and the
+ ThreadContext allow the application to store contextual data that is
+ attached to logging messages. For instance, in a web service,
+ once the caller is authenticated the username of the caller could be
+ stored in a ThreadContext property. This property would then be automatically
+ logged as part of each subsequent logging message made from the same thread.
+ </p>
+ </section>
+
+ <section id="history" name="Proven architecture">
+ <p>
+ log4net is based on the highly successful Apache log4j™ logging library,
+ in development since 1996. This popular and proven architecture has
+ so far been ported to 12 languages.
+ </p>
+ </section>
+
+ </section>
+ </body>
+</document>
diff --git a/src/site/xdoc/release/framework-support.xml b/src/site/xdoc/release/framework-support.xml
new file mode 100644
index 0000000..15a42ae
--- /dev/null
+++ b/src/site/xdoc/release/framework-support.xml
@@ -0,0 +1,883 @@
+<?xml version="1.0" ?>
+<!--
+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.
+-->
+<document>
+
+ <properties>
+ <author email="nicko at apache dot org">Nicko Cadell</author>
+ <title>Apache log4net: Supported Frameworks</title>
+ </properties>
+
+ <meta name="keywords" content="log4net supported frameworks, mono, sscli, .net, log4net" />
+
+ <body>
+ <section id="main" name="Apache log4net™ Supported Frameworks">
+
+ <section id="summary" name="Summary of .NET frameworks supported by log4net">
+ <p>
+ log4net is built on a number of different frameworks. Each new version of the frameworks add
+ new features. To take advantage of these new features we must build log4net using the
+ appropriate framework. We also maintain builds compatible with older versions of the frameworks.
+ </p>
+ <p>
+ It is important to remember that the .NET frameworks support backward compatibility, that is
+ a new version of the framework will run binary assemblies that were targeted to previous versions
+ of the framework.
+ </p>
+ <p>
+ While the number of different builds available may seem confusing, you only need to select the
+ nearest build for your platform that is equal to or earlier than your chosen deployment framework.
+ If you intend to deploy your application on the Microsoft® .NET Framework 1.0 don't pick the
+ log4net build that is built against the Microsoft .NET Framework 1.1 because the .NET framework
+ does not guarantee forward compatibility only backward compatibility.
+ </p>
+ <p>
+ log4net is regularly built by its developers on the following frameworks:
+ </p>
+
+ <div class="table">
+ <table>
+ <colgroup>
+ <col style="text-align: left; white-space: nowrap" />
+ <col style="text-align: left;" />
+ </colgroup>
+ <tr>
+ <th>Framework</th>
+ <th>Website</th>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>.NET Core 1.0 providing .NET Standard 1.3</td>
+ <td><a href="https://dotnet.github.io/">https://dotnet.github.io/</a></td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Microsoft .NET Framework 2.0</td>
+ <td><a href="http://msdn.microsoft.com/en-us/netframework/">http://msdn.microsoft.com/en-us/netframework/</a></td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Microsoft .NET Framework 3.5</td>
+ <td><a href="http://msdn.microsoft.com/en-us/netframework/">http://msdn.microsoft.com/en-us/netframework/</a></td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Microsoft .NET Framework 4.0</td>
+ <td><a href="http://msdn.microsoft.com/en-us/netframework/">http://msdn.microsoft.com/en-us/netframework/</a></td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Microsoft .NET Framework 3.5 Client Profile</td>
+ <td><a href="http://msdn.microsoft.com/en-us/library/cc656912.aspx">http://msdn.microsoft.com/en-us/library/cc656912.aspx</a></td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Microsoft .NET Framework 4.0 Client Profile</td>
+ <td><a href="http://msdn.microsoft.com/en-us/library/cc656912.aspx">http://msdn.microsoft.com/en-us/library/cc656912.aspx</a></td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Microsoft .NET Framework 4.5</td>
+ <td><a href="http://msdn.microsoft.com/en-us/netframework/">http://msdn.microsoft.com/en-us/netframework/</a></td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Mono 2.0</td>
+ <td><a href="http://www.mono-project.com">http://www.mono-project.com</a></td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Mono 3.5</td>
+ <td><a href="http://www.mono-project.com">http://www.mono-project.com</a></td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Mono 4.0</td>
+ <td><a href="http://www.mono-project.com">http://www.mono-project.com</a></td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ log4net should also build on the following
+ frameworks but binaries are not created by the
+ developers and source compatibility can not be
+ guaranteed:
+ </p>
+ <div class="table">
+ <table>
+ <colgroup>
+ <col style="text-align: left; white-space: nowrap" />
+ <col style="text-align: left;" />
+ </colgroup>
+ <tr>
+ <th>Framework</th>
+ <th>Website</th>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Microsoft .NET Framework 1.0</td>
+ <td><a href="http://msdn.microsoft.com/en-us/netframework/">http://msdn.microsoft.com/en-us/netframework/</a></td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Microsoft .NET Framework 1.1</td>
+ <td><a href="http://msdn.microsoft.com/en-us/netframework/">http://msdn.microsoft.com/en-us/netframework/</a></td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Microsoft .NET Compact Framework 1.0</td>
+ <td><a href="http://msdn2.microsoft.com/en-us/netframework/aa497273.aspx">http://msdn2.microsoft.com/en-us/netframework/aa497273.aspx</a></td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Microsoft .NET Compact Framework 2.0</td>
+ <td><a href="http://msdn2.microsoft.com/en-us/netframework/aa497273.aspx">http://msdn2.microsoft.com/en-us/netframework/aa497273.aspx</a></td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Mono 1.0</td>
+ <td><a href="http://www.mono-project.com">http://www.mono-project.com</a></td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Microsoft Shared Source CLI 1.0</td>
+ <td><a href="http://msdn.microsoft.com/en-us/library/ms973879.aspx">http://msdn.microsoft.com/en-us/library/ms973879.aspx</a></td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>CLI 1.0 Compatible</td>
+ <td><a href="http://msdn.microsoft.com/en-us/netframework/aa569283.aspx">http://msdn.microsoft.com/en-us/netframework/aa569283.aspx</a></td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ For most of these frameworks a log4net assembly targeting the framework is supplied. Although it's
+ perfectly possible to use the .NET Framework 3.5 version of log4net on the .NET Framework 4.0, having
+ an assembly that really targets a specific framework allows us to use features in that framework that
+ are not available in other frameworks or remove features from log4net that are not supported in a
+ specific framework.
+ </p>
+ <p>
+ There are no assemblies targeting the Compact
+ Framework 1.0/2.0, .NET Framework or Mono 1.x or
+ Microsoft Shared Source CLI 1.0 in the binary
+ release, but they can be built from the source
+ release.
+ </p>
+ </section>
+
+ <section id="appenders" name="Appenders">
+ <p>
+ The appenders available to each framework depend on the functionality of the
+ framework and the platform it runs on:
+ </p>
+ <div class="table">
+ <table>
+ <colgroup>
+ <col style="text-align: left;" />
+ <col style="text-align: center;" />
+ <col style="text-align: center;" />
+ <col style="text-align: center;" />
+ <col style="text-align: center;" />
+ <col style="text-align: center;" />
+ <col style="text-align: center;" />
+ <col style="text-align: center;" />
+ <col style="text-align: center;" />
+ <col style="text-align: center;" />
+ <col style="text-align: center;" />
+ <col style="text-align: center;" />
+ <col style="text-align: center;" />
+ <col style="text-align: center;" />
+ <col style="text-align: center;" />
+ <col style="text-align: center;" />
+ </colgroup>
+ <tr>
+ <th>Appender</th>
+ <th>.NET Framework 1.0</th>
+ <th>.NET Framework 1.1</th>
+ <th>.NET Framework 2.0</th>
+ <th>.NET Framework 3.5</th>
+ <th>.NET Framework 4.0</th>
+ <th>.NET Framework 4.5</th>
+ <th>.NET Framework 3.5 Client Profile</th>
+ <th>.NET Framework 4.0 Client Profile</th>
+ <th>.NET Standard 1.3</th>
+ <th>.NET CF 1.0</th>
+ <th>.NET CF 2.0</th>
+ <th>Mono</th>
+ <th>Shared Source CLI 1.0</th>
+ <th>CLI 1.0 Compatible</th>
+ </tr>
+ <tr>
+ <td>AdoNetAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td></td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td></td>
+ <td>x</td>
+ </tr>
+ <tr>
+ <td>AnsiColorTerminalAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ </tr>
+ <tr>
+ <td>AspNetTraceAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td>x</td>
+ <td></td>
+ <td>x</td>
+ </tr>
+ <tr>
+ <td>BufferingForwardingAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ </tr>
+ <tr>
+ <td>ColoredConsoleAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ConsoleAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ </tr>
+ <tr>
+ <td>DebugAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ </tr>
+ <tr>
+ <td>EventLogAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td>x</td>
+ <td></td>
+ <td>x</td>
+ </tr>
+ <tr>
+ <td>FileAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ </tr>
+ <tr>
+ <td>ForwardingAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ </tr>
+ <tr>
+ <td>LocalSyslogAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td></td>
+ <td></td>
+ <td>x</td>
+ <td></td>
+ <td>x</td>
+ </tr>
+ <tr>
+ <td>ManagedColoredConsoleAppender</td>
+ <td></td>
+ <td></td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td></td>
+ <td></td>
+ <td>x</td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>MemoryAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ </tr>
+ <tr>
+ <td>NetSendAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>OutputDebugStringAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>RemoteSyslogAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ </tr>
+ <tr>
+ <td>RemotingAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ </tr>
+ <tr>
+ <td>RollingFileAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ </tr>
+ <tr>
+ <td>SmtpAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td>x</td>
+ <td></td>
+ <td>x</td>
+ </tr>
+ <tr>
+ <td>SmtpPickupDirAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ </tr>
+ <tr>
+ <td>TelnetAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ </tr>
+ <tr>
+ <td>TraceAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ </tr>
+ <tr>
+ <td>UdpAppender</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ <td>x</td>
+ </tr>
+ </table>
+ </div>
+ </section>
+
+ <section id="notes" name="Framework Specific Notes">
+ <section id="netstandard-1.3" name=".NET Core 1.0 / .NET Standard 1.3">
+ <p>
+ Targets netstandard-1.3 and thus doesn't support
+ a few things that work on Mono or the classical
+ .NET platform.
+ </p>
+ <p>Things that are not supported in log4net
+ for .NET Standard 1.3:</p>
+ <ul>
+ <li>the ADO.NET appender</li>
+ <li>anything related to ASP.NET (trace appender
+ and several pattern converters)</li>
+ <li>.NET Remoting</li>
+ <li>the colored console appender</li>
+ <li>the event log appender</li>
+ <li>The <code>NetSendAppender</code></li>
+ <li>The SMTP appender</li>
+ <li><code>DOMConfigurator</code></li>
+ <li>stack trace patterns</li>
+ <li>access to <code>appSettings</code> (neither
+ the log4net section itself nor using the
+ <code>AppSettingsPatternConverter</code>)</li>
+ <li>Access to "special paths" using the
+ <code>EnvironmentFolderPathPatternConverter</code></li>
+ <li>Impersonation of Windows accounts</li>
+ </ul>
+
+ <p><code>log4net.LogicalThreadContext</code> and
+ the associated properties and stack classes use
+ <code>AsyncLocal</code> rather than
+ <code>CallContext</code>. Prior to log4net 2.0.8
+ they haven't been supported for .NET Standard at
+ all.</p>
+ </section>
+
+ <section id="net1.0" name="Microsoft .NET Framework 1.0">
+ <p>
+ none
+ </p>
+ </section>
+
+ <section id="net1.1" name="Microsoft .NET Framework 1.1">
+ <p>
+ none
+ </p>
+ </section>
+
+ <section id="net2.0" name="Microsoft .NET Framework 2.0">
+ <p>
+ none
+ </p>
+ </section>
+
+ <section id="net3.5" name="Microsoft .NET Framework 3.5">
+ <p>
+ none
+ </p>
+ </section>
+
+ <section id="net4.0" name="Microsoft .NET Framework 4.0">
+ <p>
+ none
+ </p>
+ </section>
+
+ <section id="net4.5" name="Microsoft .NET Framework 4.5">
+ <p>
+ none
+ </p>
+ </section>
+
+ <section id="netcp3.5" name="Microsoft .NET Framework 3.5 Client Profile">
+ <p>
+ As of log4net 1.2.11 this version is identical
+ to the .NET 3.5 version without support for
+ ASP.NET specific appenders and patterns.
+ </p>
+ </section>
+
+ <section id="netcp4.0" name="Microsoft .NET Framework 4.0 Client Profile">
+ <p>
+ As of log4net 1.2.11 this version is identical
+ to the .NET 4.0 version without support for
+ ASP.NET specific appenders and patterns.
+ </p>
+ </section>
+
+ <section id="netcf1.0" name="Microsoft .NET Compact Framework 1.0">
+ <h4>Assembly attributes</h4>
+ <p>
+ The .NET Compact Framework 1.0 does not support retrieving assembly level
+ attributes, therefore all log4net configuration attributes were removed from
+ the .NET Compact Framework 1.0 version of log4net.
+ </p>
+ <p>
+ For Smart-device applications, the log4net system can be configured by passing
+ the location of the log4net configuration file to the
+ <span class="code">log4net.Config.XmlConfigurator.Configure(FileInfo)</span>
+ method in the entry point of the application.
+ </p>
+ <p>For example:</p>
+ <p />
+ <pre class="code">
+namespace TestApp
+{
+ using System.IO;
+
+ public class EntryPoint
+ {
+ /// <summary>
+ /// Application entry point.
+ /// </summary>
+ public static void Main()
+ {
+ // Uncomment the next line to enable log4net internal debugging
+ // log4net.Util.LogLog.InternalDebugging = true;
+
+ // This will instruct log4net to look for a configuration file
+ // called config.log4net in the root directory of the device
+ log4net.Config.XmlConfigurator.Configure(new FileInfo(@"\config.log4net"));
+
+ ...
+
+ // This will shutdown the log4net system
+ log4net.LogManager.Shutdown();
+ }
+ }
+}
+ </pre>
+ <h4>Notification events</h4>
+ <p>
+ The .NET Compact Framework 1.0 does not support notification events during the
+ application shutdown, therefore log4net cannot automatically hook the
+ application shutdown notification.
+ </p>
+ <p>
+ Applications will need to programmatically shutdown the log4net system during
+ the application's shutdown using the
+ <span class="code">log4net.LogManager.Shutdown()</span>
+ method in order to prevent losing logging events.
+ See the code above for an example.
+ </p>
+ <h4>FileSystemWatcher</h4>
+ <p>
+ The .NET Compact Framework 1.0 does not support the
+ <span class="code">System.IO.FileSystemWatcher</span>
+ class. As a result, the
+ <span class="code">XmlConfiguratorAttribute.Watch</span>
+ property and the
+ <span class="code">XmlConfigurator.ConfigureAndWatch</span>
+ methods are not available. Watching changes to the log4net configuration
+ file is not supported on the .NET Compact Framework 1.0.
+ </p>
+ <h4>UserName</h4>
+ <p>
+ The .NET Compact Framework 1.0 does not support the
+ <span class="code">System.Security.Principal.WindowsIdentity</span> class.
+ This is used to capture the current thread's user identity. Therefore
+ the <span class="code">LoggingEvent.UserName</span> property will return the value
+ <span class="code">"NOT AVAILABLE"</span>.
+ </p>
+ <h4>Identity</h4>
+ <p>
+ The .NET Compact Framework 1.0 does not support the
+ <span class="code">System.Security.Principal.IPrincipal</span> interface.
+ This is used to capture the current thread's user identity. Therefore
+ the <span class="code">LoggingEvent.Identity</span> property will return the value
+ <span class="code">"NOT AVAILABLE"</span>.
+ </p>
+ <h4>Environment variables</h4>
+ <p>
+ The .NET Compact Framework 1.0 does not support retrieving environment
+ variables, therefore it's not possible to substitute environment variables in
+ parameter values when using the .NET Compact Framework 1.0 version of log4net.
+ </p>
+ <h4>Serialization</h4>
+ <p>
+ The .NET Compact Framework 1.0 does not support serialization, therefore none of
+ the log4net classes in the .NET Compact Framework 1.0 version are serializable.
+ </p>
+ <h4>LoggingEvent.Domain</h4>
+ <p>
+ The .NET Compact Framework 1.0 does not support AppDomain functionality. The
+ friendly name for the current AppDomain is stored in the <span class="code">LoggingEvent.Domain</span>
+ property and is accessed using the <span class="code">%a</span> pattern of the
+ <span class="code">PatternLayout</span>. On the .NET Compact Framework 1.0 this
+ value is generated by taking the file name for the application's primary module.
+ </p>
+ </section>
+ <section id="netcf2.0" name="Microsoft .NET Compact Framework 2.0">
+ <p>
+ See notes for .NET Compact Framework 1.0
+ </p>
+ </section>
+ <section id="mono" name="Mono">
+ <p>
+ There are 2 separate builds of log4net for mono; Mono 1.0, built using the C# compiler in a mode
+ which is compatible with the CLI 1.0 language specification, and; Mono 2.0, built using the .NET
+ 2.0 extensions to the C# language.
+ </p>
+
+ <section id="mono1.0" name="Mono 1.0">
+ <p>
+ none
+ </p>
+ </section>
+ <section id="mono2.0" name="Mono 2.0">
+ <p>
+ none
+ </p>
+ </section>
+ <section id="mono3.5" name="Mono 3.5">
+ <p>
+ none
+ </p>
+ </section>
+ <section id="mono4.0" name="Mono 4.0">
+ <p>
+ none
+ </p>
+ </section>
+
+ </section>
+
+ <section id="sscli1.0" name="Microsoft Shared Source CLI 1.0">
+ <h4>FileSystemWatcher</h4>
+ <p>
+ SSCLI 1.0 does not support the
+ <span class="code">System.IO.FileSystemWatcher</span>
+ class. As a result, the
+ <span class="code">XmlConfiguratorAttribute.Watch</span>
+ property and the
+ <span class="code">XmlConfigurator.ConfigureAndWatch</span>
+ methods are not available. Watching changes to the log4net configuration
+ file is not supported on SSCLI 1.0.
+ </p>
+ <h4>UserName</h4>
+ <p>
+ SSCLI 1.0 does not support the
+ <span class="code">System.Security.Principal.WindowsIdentity</span> class.
+ This is used to capture the current thread's user identity. Therefore
+ the <span class="code">LoggingEvent.UserName</span> property will return the value
+ <span class="code">"NOT AVAILABLE"</span>.
+ </p>
+ <h4>Identity</h4>
+ <p>
+ SSCLI 1.0 does not support the
+ <span class="code">System.Security.Principal.IPrincipal</span> interface.
+ This is used to capture the current thread's user identity. Therefore
+ the <span class="code">LoggingEvent.Identity</span> property will return the value
+ <span class="code">"NOT AVAILABLE"</span>.
+ </p>
+ </section>
+
+ <section id="cli1.0" name="CLI 1.0 Compatible">
+ <p>
+ This build of log4net is designed to run on any ECMA CLI 1.0 compatible runtime.
+ The assembly does not support any platform specific features. The build includes
+ the common subset of functionality found in the .NET 1.0 and Mono 1.0 builds.
+ The output assembly is built using the Microsoft .NET 1.0 compiler and library.
+ </p>
+ <p>
+ The log4net CLI 1.0 assembly is runtime compatible with the following frameworks:
+ </p>
+ <ul>
+ <li>Microsoft .NET Framework 1.0 (and higher)</li>
+ <li>Mono 1.0 (and higher)</li>
+ </ul>
+ <p>
+ Only a Release build is generated for this configuration because the assembly
+ debugging information has not been standardized.
+ </p>
+ </section>
+
+ </section>
+
+ </section>
+
+ </body>
+</document>
diff --git a/src/site/xdoc/release/howto/chainsaw.xml b/src/site/xdoc/release/howto/chainsaw.xml
new file mode 100644
index 0000000..1bfef69
--- /dev/null
+++ b/src/site/xdoc/release/howto/chainsaw.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" ?>
+<!--
+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.
+-->
+<document>
+
+ <properties>
+ <author email="rongrabowski at yahoo dot com">Ron Grabowski</author>
+ <author email="nicko at apache dot org">Nicko Cadell</author>
+ <title>Apache log4net: How To view logging events using Apache log4j Chainsaw</title>
+ </properties>
+
+ <meta name="keywords" content="chainsaw log4net, log4net" />
+
+ <body>
+ <section id="main" name="How To view logging events using Apache log4j Chainsaw">
+ <p>
+ Apache log4j™ includes <a href="http://logging.apache.org/log4j/docs/chainsaw.html">Apache Chainsaw™</a>
+ a graphical log viewer.
+ </p>
+ <p>
+ Chainsaw can either receive and display log events in realtime over
+ the network, or it can load a previously created log file.
+ </p>
+
+ <p>
+ Before Chainsaw can display data, one or more receivers must be setup.
+ This is usually done by specifying an xml config file when the program
+ first starts up. <br />
+ Save one or more of the sample xml config files to your local system and
+ load them when Chainsaw starts.
+ </p>
+
+ <p>
+ Please note also that it may be necessary to configure Chainsaw tabs as reported as
+ issue <a href="https://issues.apache.org/jira/browse/LOG4NET-259">LOG4NET-259</a>.
+ </p>
+
+ <section id="udp" name="Logging via UDP">
+ <p>
+ Apache log4net™ can be configured to log messages via UDP in such a way that Chainsaw
+ can receive and display them.
+ </p>
+
+ <section id="udp-conf" name="log4net UDP Configuration">
+ <p>
+ Configure log4net to use a UdpAppender with the following config snippet:
+ </p>
+
+ <source language="xml"><![CDATA[
+<appender name="UdpAppender" type="log4net.Appender.UdpAppender">
+ <remoteAddress value="127.0.0.1" />
+ <remotePort value="8080" />
+ <layout type="log4net.Layout.XmlLayoutSchemaLog4j">
+ <locationInfo value="true" />
+ </layout>
+</appender>]]></source>
+ </section>
+
+ <section id="udp-chainsaw" name="Chainsaw UDP receiver Configuration">
+ <p>
+ Chainsaw should be configured to start a <c>UDPReceiver</c> using the
+ following configuration document:
+ </p>
+
+ <source language="xml"><![CDATA[
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">
+ <plugin name="UDPReceiver" class="org.apache.log4j.net.UDPReceiver">
+ <param name="Port" value="8080" />
+ </plugin>
+</log4j:configuration>]]></source>
+ </section>
+
+ </section>
+
+ <section id="xml-file" name="Logging to XML file">
+ <p>
+ Chainsaw can also load an XML log file if it is formatted according
+ to the log4j schema. Use the following log4net config to output
+ to file using the log4j schema:
+ </p>
+
+ <source language="xml"><![CDATA[
+<appender name="FileAppender" type="log4net.Appender.FileAppender">
+ <file value="log-file.txt" />
+ <appendToFile value="true" />
+ <layout type="log4net.Layout.XmlLayoutSchemaLog4j">
+ <locationInfo value="true" />
+ </layout>
+</appender>]]></source>
+
+ <p>
+ To load the file into Chainsaw drag the file into the Chainsaw
+ app and drop it on the tab labeled <i>Drag & Drop log files here</i>.
+ </p>
+ </section>
+
+ </section>
+ </body>
+</document>
diff --git a/src/site/xdoc/release/howto/index.xml b/src/site/xdoc/release/howto/index.xml
new file mode 100644
index 0000000..43c72d9
--- /dev/null
+++ b/src/site/xdoc/release/howto/index.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" ?>
+<!--
+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.
+-->
+<document>
+
+ <properties>
+ <author email="nicko at apache dot org">Nicko Cadell</author>
+ <title>Apache log4net: How Tos</title>
+ </properties>
+
+ <meta name="keywords" content="howto log4net, log4net" />
+
+ <body>
+ <section id="main" name="Apache log4net™ How Tos">
+
+ <p>
+ Below are presented, in no particular order, a series of documents
+ on how to get stuff done.
+ </p>
+ <p>
+ New documents can be contributed via the issue tracking system.
+ See the <a href="../../issue-tracking.html">Issue Tracking</a> page for
+ details.
+ </p>
+
+ <ul>
+ <li>
+ <p><a href="chainsaw.html">How To view logging events using Apache Chainsaw</a></p>
+ </li>
+ <!--
+ <li>
+ <p><a href="custom-appender.html">How To write your own appender</a></p>
+ </li>
+ -->
+ </ul>
+
+ </section>
+ </body>
+</document>
diff --git a/src/site/xdoc/release/manual/configuration.xml b/src/site/xdoc/release/manual/configuration.xml
new file mode 100644
index 0000000..8cdddd8
--- /dev/null
+++ b/src/site/xdoc/release/manual/configuration.xml
@@ -0,0 +1,1247 @@
+<?xml version="1.0" ?>
+<!--
+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.
+-->
+<document>
+
+ <properties>
+ <author email="nicko at apache dot org">Nicko Cadell</author>
+ <title>Apache log4net Manual: Configuration</title>
+ </properties>
+
+ <meta name="keywords" content="log4net configuration, log4net" />
+
+ <body>
+ <section id="main" name="Apache log4net™ Manual - Configuration">
+
+ <section id="config" name="Configuration">
+ <p>
+ Inserting log requests into the application code requires a fair amount of
+ planning and effort. Observation shows that approximately 4 percent of code is
+ dedicated to logging. Consequently, even moderately sized applications will
+ have thousands of logging statements embedded within their code. Given their
+ number, it becomes imperative to manage these log statements without the need
+ to modify them manually.
+ </p>
+ <p>
+ The log4net environment is fully configurable programmatically. However, it is
+ far more flexible to configure log4net using configuration files. Currently,
+ configuration files are written in XML.
+ </p>
+ <p>
+ Let us give a taste of how this is done with the help of an imaginary
+ application
+ <span class="code">MyApp</span>
+ that uses log4net.
+ </p>
+ <div class="syntax"><pre class="code">
+using Com.Foo;
+
+// Import log4net classes.
+<b>using log4net;
+using log4net.Config;</b>
+
+public class MyApp
+{
+ // Define a static logger variable so that it references the
+ // Logger instance named "MyApp".
+ <strong>private static readonly</strong> ILog log = <strong>LogManager.GetLogger(typeof(MyApp));</strong>
+
+ static void Main(string[] args)
+ {
+ // Set up a simple configuration that logs on the console.
+ <strong>BasicConfigurator.Configure();</strong>
+
+ log.Info("Entering application.");
+ Bar bar = new Bar();
+ bar.DoIt();
+ log.Info("Exiting application.");
+ }
+}</pre></div>
+ <p>
+ <span class="code">MyApp</span>
+ begins by importing log4net related classes. It then defines a static logger
+ variable with the name
+ <span class="code">MyApp</span>
+ which happens to be the fully qualified name of the class.
+ </p>
+ <p>
+ <span class="code">MyApp</span>
+ uses the following
+ <span class="code">Bar</span>
+ class:
+ </p>
+ <div class="syntax"><pre class="code">
+// Import log4net classes.
+using log4net;
+
+<b>namespace Com.Foo</b>
+{
+ public class Bar
+ {
+ <strong>private static readonly</strong> ILog log = <strong>LogManager.GetLogger(typeof(Bar));</strong>
+
+ public void DoIt()
+ {
+ log.Debug("Did it again!");
+ }
+ }
+}</pre></div>
+ <p>
+ The invocation of the
+ <span class="code">BasicConfigurator.Configure()</span>
+ method creates a rather simple log4net setup. This method is hardwired to add
+ to the <i>root</i> logger a
+ <span class="code">ConsoleAppender</span>. The output will be formatted using a
+ <span class="code">PatternLayout</span>
+ set to the pattern
+ <span class="code">"%-4timestamp [%thread] %-5level %logger %ndc - %message%newline"</span>.
+ </p>
+ <p>
+ Note that by default, the <i>root</i> logger is assigned to
+ <span class="code">Level.DEBUG</span>.
+ </p>
+ <p>
+ The output of <span class="code">MyApp</span> is:
+ </p>
+ <source language="text"><![CDATA[
+0 [main] INFO MyApp - Entering application.
+36 [main] DEBUG Com.Foo.Bar - Did it again!
+51 [main] INFO MyApp - Exiting application.]]></source>
+ <p>
+ As a side note, let me mention that in log4net child loggers link only to their
+ existing ancestors. In particular, the logger named
+ <span class="code">Com.Foo.Bar</span>
+ is linked directly to the
+ <i>root</i>
+ logger, thereby circumventing the unused
+ <span class="code">Com</span>
+ or
+ <span class="code">Com.Foo</span>
+ loggers. This significantly increases performance and reduces log4net's memory
+ footprint.
+ </p>
+ <p>
+ The
+ <span class="code">MyApp</span>
+ class configures log4net by invoking
+ <span class="code">BasicConfigurator.Configure()</span>
+ method. Other classes only need to import the
+ <span class="code">log4net</span>
+ namespace, retrieve the loggers they wish to use, and log away.
+ </p>
+ <p>
+ The previous example always outputs the same log information. Fortunately, it
+ is easy to modify
+ <span class="code">MyApp</span>
+ so that the log output can be controlled at run-time. Here is a slightly
+ modified version.
+ </p>
+ <div class="syntax"><pre class="code">
+using Com.Foo;
+
+// Import log4net classes.
+using log4net;
+<b>using log4net.Config;</b>
+
+public class MyApp
+{
+ private static readonly ILog log = LogManager.GetLogger(typeof(MyApp));
+
+ static void Main(string[] args)
+ {
+ // BasicConfigurator replaced with XmlConfigurator.
+ <strong>XmlConfigurator.Configure(new System.IO.FileInfo(args[0]));</strong>
+
+ log.Info("Entering application.");
+ Bar bar = new Bar();
+ bar.DoIt();
+ log.Info("Exiting application.");
+ }
+}</pre></div>
+ <p>
+ This version of
+ <span class="code">MyApp</span>
+ instructs the
+ <span class="code">XmlConfigurator</span>
+ to parse a configuration file and set up logging accordingly. The path to the
+ configuration file is specified on the command line.
+ </p>
+ <p>
+ Here is a sample configuration file that results in exactly same output as the
+ previous
+ <span class="code">BasicConfigurator</span>
+ based example.
+ </p>
+ <source language="xml"><![CDATA[
+<log4net>
+ <!-- A1 is set to be a ConsoleAppender -->
+ <appender name="A1" type="log4net.Appender.ConsoleAppender">
+
+ <!-- A1 uses PatternLayout -->
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%-4timestamp [%thread] %-5level %logger %ndc - %message%newline" />
+ </layout>
+ </appender>
+
+ <!-- Set root logger level to DEBUG and its only appender to A1 -->
+ <root>
+ <level value="DEBUG" />
+ <appender-ref ref="A1" />
+ </root>
+</log4net>]]></source>
+ <p>
+ Suppose we are no longer interested in seeing the output of any component
+ belonging to the
+ <span class="code">Com.Foo</span>
+ package. The following configuration file shows one possible way of achieving
+ this.
+ </p>
+ <source language="xml"><![CDATA[
+<log4net>
+ <!-- A1 is set to be a ConsoleAppender -->
+ <appender name="A1" type="log4net.Appender.ConsoleAppender">
+
+ <!-- A1 uses PatternLayout -->
+ <layout type="log4net.Layout.PatternLayout">
+ <!-- Print the date in ISO 8601 format -->
+ <conversionPattern value="%date [%thread] %-5level %logger %ndc - %message%newline" />
+ </layout>
+ </appender>
+
+ <!-- Set root logger level to DEBUG and its only appender to A1 -->
+ <root>
+ <level value="DEBUG" />
+ <appender-ref ref="A1" />
+ </root>
+
+ <!-- Print only messages of level WARN or above in the package Com.Foo -->
+ <logger name="Com.Foo">
+ <level value="WARN" />
+ </logger>
+</log4net>]]></source>
+ <p>
+ The output of
+ <span class="code">MyApp</span>
+ configured with this file is shown below.
+ </p>
+ <source language="text">
+2000-09-07 14:07:41,508 [main] INFO MyApp - Entering application.
+2000-09-07 14:07:41,529 [main] INFO MyApp - Exiting application.</source>
+ <p>
+ As the logger
+ <span class="code">Com.Foo.Bar</span>
+ does not have an assigned level, it inherits its level from
+ <span class="code">Com.Foo</span>, which was set to WARN in the configuration
+ file. The log statement from the
+ <span class="code">Bar.DoIt</span>
+ method has the level DEBUG, lower than the logger level WARN. Consequently,
+ <span class="code">DoIt()</span>
+ method's log request is suppressed.
+ </p>
+ <p>
+ Here is another configuration file that uses multiple appenders.
+ </p>
+ <source language="C#"><![CDATA[
+<log4net>
+ <appender name="Console" type="log4net.Appender.ConsoleAppender">
+ <layout type="log4net.Layout.PatternLayout">
+ <!-- Pattern to output the caller's file name and line number -->
+ <conversionPattern value="%5level [%thread] (%file:%line) - %message%newline" />
+ </layout>
+ </appender>
+
+ <appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
+ <file value="example.log" />
+ <appendToFile value="true" />
+ <maximumFileSize value="100KB" />
+ <maxSizeRollBackups value="2" />
+
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%level %thread %logger - %message%newline" />
+ </layout>
+ </appender>
+
+ <root>
+ <level value="DEBUG" />
+ <appender-ref ref="Console" />
+ <appender-ref ref="RollingFile" />
+ </root>
+</log4net>]]></source>
+ <p>
+ Calling the enhanced <span class="code">MyApp</span> with the this configuration file will output the
+ following on the console.
+ </p>
+ <source language="text"><![CDATA[
+ INFO [main] (MyApp.cs:16) - Entering application.
+DEBUG [main] (Bar.cs:12) - Doing it again!
+ INFO [main] (MyApp.cs:19) - Exiting application.]]></source>
+ <p>
+ In addition, as the <i>root</i> logger has been allocated a second appender, output
+ will also be directed to the
+ <span class="code">example.log</span>
+ file. This file will be rolled over when it reaches 100KB. When roll-over
+ occurs, the old version of
+ <span class="code">example.log</span>
+ is automatically moved to
+ <span class="code">example.log.1</span>.
+ </p>
+ <p>
+ Note that to obtain these different logging behaviors we did not need to
+ recompile code. We could just as easily have logged to an email address,
+ redirected all
+ <span class="code">Com.Foo</span>
+ output to an NT Event logger, or forwarded logging events to a remote log4net
+ server, which would log according to local server policy.
+ </p>
+ <p>
+ For more examples of configuring appenders using the <span class="code">XmlConfigurator</span>
+ see the <a href="../config-examples.html">Example Appender Configuration</a>
+ document.
+ </p>
+
+ <section id="attributes" name="Configuration Attributes">
+ <p>
+ The log4net configuration can be configured using assembly-level attributes rather than
+ specified programmatically.
+ </p>
+ <ul>
+ <li>
+ <b>XmlConfiguratorAttribute</b>
+ <p>
+ The <span class="code">log4net.Config.XmlConfiguratorAttribute</span> Allows the
+ <span class="code">XmlConfigurator</span> to be configured using the following properties:
+ </p>
+ <ul>
+ <li>
+ <b>ConfigFile</b>
+ <p>
+ If specified, this is the filename of the configuration file to use with the
+ <span class="code">XmlConfigurator</span>. This file path is relative to the
+ application base directory (<span class="code">AppDomain.CurrentDomain.BaseDirectory</span>).
+ </p>
+ <p>
+ This property cannot be used in conjunction with the
+ <span class="code">ConfigFileExtension</span> property.
+ </p>
+ </li>
+ <li>
+ <b>ConfigFileExtension</b>
+ <p>
+ If specified, this is the extension for the configuration file. The assembly
+ file name is used as the base name with the this extension appended. For example
+ if the assembly is loaded from the a file <span class="code">TestApp.exe</span>
+ and the <span class="code">ConfigFileExtension</span> property is set to
+ <span class="code">log4net</span> then the configuration file name is
+ <span class="code">TestApp.exe.log4net</span>. This is equivalent to setting the
+ <span class="code">ConfigFile</span> property to <span class="code">TestApp.exe.log4net</span>.
+ </p>
+ <p>
+ The path to the configuration file is build by using the application base
+ directory (<span class="code">AppDomain.CurrentDomain.BaseDirectory</span>),
+ the assembly file name and the configuration file extension.
+ </p>
+ <p>
+ This property cannot be used in conjunction with the
+ <span class="code">ConfigFile</span> property.
+ </p>
+ </li>
+ <li>
+ <b>Watch</b>
+ <p>
+ If this flag is specified and set to <span class="code">true</span>
+ then the framework will watch the configuration file and will reload the config
+ each time the file is modified.
+ </p>
+ </li>
+ </ul>
+ <p>
+ If neither of the <span class="code">ConfigFile</span> or <span class="code">ConfigFileExtension</span>
+ properties are specified, the application configuration file (e.g. <span class="code">TestApp.exe.config</span>)
+ will be used as the log4net configuration file.
+ </p>
+ <p>
+ Example usage:
+ </p>
+ <div class="syntax"><pre class="code">
+// Configure log4net using the .config file
+<b>[assembly: log4net.Config.XmlConfigurator(Watch=true)]</b>
+// This will cause log4net to look for a configuration file
+// called TestApp.exe.config in the application base
+// directory (i.e. the directory containing TestApp.exe)
+// The config file will be watched for changes.
+ </pre></div>
+ <div class="syntax"><pre class="code">
+// Configure log4net using the .log4net file
+<b>[assembly: log4net.Config.XmlConfigurator(ConfigFileExtension="log4net",Watch=true)]</b>
+// This will cause log4net to look for a configuration file
+// called TestApp.exe.log4net in the application base
+// directory (i.e. the directory containing TestApp.exe)
+// The config file will be watched for changes.
+ </pre></div>
+ <p>
+ This attribute may only be used once per assembly.
+ </p>
+ </li>
+ </ul>
+ <p>
+ Using attributes can be a clearer method for defining where the application's
+ configuration will be loaded from. However it is worth noting that attributes
+ are purely passive. They are information only. Therefore if you use configuration
+ attributes you must invoke log4net to allow it to read the attributes. A simple
+ call to <span class="code">LogManager.GetLogger</span> will cause the attributes
+ on the calling assembly to be read and processed. <strong>Therefore it is imperative
+ to make a logging call as early as possible during the application start-up, and
+ certainly before any external assemblies have been loaded and invoked.</strong>
+ </p>
+ </section>
+
+ <section id="appSettings" name="appSettings">
+ <p>
+ If you use <a href="#attributes">attributes</a> to
+ configure log4net, two settings of the
+ <code>appSettings</code> section of your
+ application's configuration file can be used to
+ override the values given in your assembly's
+ attributes.
+ </p>
+ <p>
+ The setting with the key "log4net.Config"
+ overrides the configuration file name (and is
+ considered to be relative to your application's
+ base directory), the setting with the key
+ "log4net.Config.Watch" determines whether the file
+ should be monitored for changes.
+ </p>
+ <p>
+ Even though the assembly attribute
+ </p>
+ <div class="syntax"><pre class="code">
+<b>[assembly: log4net.Config.XmlConfigurator(Watch=false)]</b>
+ </pre></div>
+ <p>
+ would configure your application to use a
+ configuration file "TestApp.exe.config" and not
+ monitor it for changes you can override this to
+ use the file "log4net.config" and monitor it
+ instead by adding
+ </p>
+ <div class="syntax"><pre class="code"><![CDATA[
+<appSettings>
+ <add key="log4net.Config" value="log4net.config"/>
+ <add key="log4net.Config.Watch" value="True"/>
+</appSettings>]]>
+ </pre></div>
+
+ <p>
+ to your application's configuration file.
+ </p>
+ </section>
+
+ <section id="files" name="Configuration Files">
+ <p>
+ Typically the log4net configuration is specified using a file. This file can
+ be read in one of two ways:
+ </p>
+ <ul>
+ <li>Using the .NET <span class="code">System.Configuration</span> API</li>
+ <li>Reading the file contents directly</li>
+ </ul>
+
+ <section id="dot-config" name=".config Files">
+ <p>
+ The <span class="code">System.Configuration</span> API is only available if the
+ configuration data is in the application's config file; the file named
+ <i>MyApp.exe.config</i> or <i>Web.config</i>. Because the <span class="code">System.Configuration</span>
+ API does not support reloading of the config file the configuration settings
+ cannot be watched using the <span class="code">log4net.Config.XmlConfigurator.ConfigureAndWatch</span>
+ methods. The main advantage of using the <span class="code">System.Configuration</span>
+ APIs to read the configuration data is that it requires less permissions than accessing
+ the configuration file directly.
+ </p>
+ <p>
+ The only way to configure an application using the <span class="code">System.Configuration</span>
+ APIs is to call the <span class="code">log4net.Config.XmlConfigurator.Configure()</span> method or
+ the <span class="code">log4net.Config.XmlConfigurator.Configure(ILoggerRepository)</span> method.
+ </p>
+ <p>
+ In order to embed the configuration data in the .config file the section name must be
+ identified to the .NET config file parser using a <span class="code">configSections</span> element.
+ The section must specify the <span class="code">log4net.Config.Log4NetConfigurationSectionHandler</span>
+ that will be used to parse the config section. This type must be fully assembly qualified
+ because it is being loaded by the .NET config file parser not by log4net. The correct
+ assembly name for the log4net assembly must be specified.
+ The following is a simple example configuration file that specifies the correct
+ section handler to use for the log4net section.
+ </p>
+ <source language="xml"><![CDATA[
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <configSections>
+ <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
+ </configSections>
+ <log4net>
+ <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" >
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" />
+ </layout>
+ </appender>
+ <root>
+ <level value="INFO" />
+ <appender-ref ref="ConsoleAppender" />
+ </root>
+ </log4net>
+</configuration>]]></source>
+ <p>
+ In the above example the <span class="code">log4net</span> assembly is specified.
+ This assembly must be located where the .NET runtime can find it. For example it could
+ be located in the same directory as the application. If the log4net assembly is stored in
+ the GAC then the fully qualified assembly name must be specified including the culture,
+ version and public key.
+ </p>
+ <p>
+ When using the .config file to specify the configuration the section name and
+ XML element name must be <span class="code">log4net</span>.
+ </p>
+ </section>
+
+ <section id="reading" name="Reading Files Directly">
+ <p>
+ The XmlConfigurator can directly read any XML file and use it to configure log4net.
+ This includes the application's .config file; the file named <i>MyApp.exe.config</i>
+ or <i>Web.config</i>. The only reason not to read the configuration file directly is if the
+ application does not have sufficient permissions to read the file, then the configuration
+ must be loaded using the .NET configuration APIs (see above).
+ </p>
+ <p>
+ The file to read the configuration from can be specified using any of
+ the <span class="code">log4net.Config.XmlConfigurator</span> methods that
+ accept a <span class="code">System.IO.FileInfo</span> object. Because the
+ file system can be monitored for file change notifications the
+ <span class="code">ConfigureAndWatch</span> methods can be used to monitor
+ the configuration file for modifications and automatically reconfigure log4net.
+ </p>
+ <p>
+ Additionally the <span class="code">log4net.Config.XmlConfiguratorAttribute</span>
+ can be used to specify the file to read the configuration from.
+ </p>
+ <p>
+ The configuration is read from the <span class="code">log4net</span> element
+ in the file. Only one <span class="code">log4net</span> element can be specified
+ in the file but it may be located anywhere in the XML hierarchy. For example it
+ may be the root element:
+ </p>
+ <source language="xml"><![CDATA[
+<?xml version="1.0" encoding="utf-8" ?>
+<log4net>
+ <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" >
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" />
+ </layout>
+ </appender>
+ <root>
+ <level value="INFO" />
+ <appender-ref ref="ConsoleAppender" />
+ </root>
+</log4net>]]></source>
+ <p>
+ Or it may be nested within other elements:
+ </p>
+ <source language="xml"><![CDATA[
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <configSections>
+ <section name="log4net" type="System.Configuration.IgnoreSectionHandler" />
+ </configSections>
+ <log4net>
+ <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" >
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" />
+ </layout>
+ </appender>
+ <root>
+ <level value="INFO" />
+ <appender-ref ref="ConsoleAppender" />
+ </root>
+ </log4net>
+</configuration>]]></source>
+ <p>
+ The above example shows how the configuration data can be embedded
+ inside a .config file even though the file is being read directly
+ by log4net. An important note is that the .NET config file parser
+ will throw an exception if it finds an element that has not been
+ registered using the <span class="code">configSections</span> element.
+ Therefore in the above example the <span class="code">log4net</span>
+ section name is registered, but the type specified to handle the
+ section is <span class="code">System.Configuration.IgnoreSectionHandler</span>.
+ This is a built-in class that indicates that another method for reading
+ the config section will be employed.
+ </p>
+ </section>
+
+ </section>
+
+ <section id="syntax" name="Configuration Syntax">
+ <p>
+ log4net includes a configuration reader that parses an XML DOM, the
+ <span class="code">log4net.Config.XmlConfigurator</span>. This section defines the
+ syntax accepted by the configurator.
+ </p>
+ <p>
+ This is an example of a valid XML configuration. The root element
+ must be <span class="code"><log4net></span>. Note that this does not mean
+ that this element cannot be embedded in another XML document. See the section above
+ on <a href="#configuration.files">Configuration Files</a> for more information
+ on how to embed the XmlConfigurator XML in a configuration file.
+ </p>
+ <source language="xml"><![CDATA[
+<log4net>
+ <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" >
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" />
+ </layout>
+ </appender>
+ <root>
+ <level value="INFO" />
+ <appender-ref ref="ConsoleAppender" />
+ </root>
+</log4net>]]></source>
+ <p>
+ The <span class="code"><log4net></span> element supports the following attributes:
+ </p>
+ <div class="table">
+ <table>
+ <colgroup>
+ <col style="text-align: left; white-space: nowrap; width: 7em" />
+ <col style="text-align: left;" />
+ </colgroup>
+ <tr>
+ <th>Attribute</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>debug</td>
+ <td>
+ Optional attribute. Value must be either <span class="code">true</span> or <span class="code">false</span>.
+ The default value is <span class="code">false</span>. Set this attribute to <span class="code">true</span>
+ to enable internal log4net debugging for this configuration.
+ </td>
+ </tr>
+ <tr>
+ <td>update</td>
+ <td>
+ Optional attribute. Value must be either <span class="code">Merge</span> or <span class="code">Overwrite</span>.
+ The default value is <span class="code">Merge</span>. Set this attribute to <span class="code">Overwrite</span>
+ to reset the configuration of the repository being configured before applying this configuration.
+ </td>
+ </tr>
+ <tr>
+ <td>threshold</td>
+ <td>
+ Optional attribute. Value must be the name of a level registered on the repository.
+ The default value is <span class="code">ALL</span>. Set this attribute to limit the messages
+ that are logged across the whole repository, regardless of the logger that the message is logged to.
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ The <span class="code"><log4net></span> element supports the following child elements:
+ </p>
+ <div class="table">
+ <table>
+ <colgroup>
+ <col style="text-align: left; white-space: nowrap; width: 7em" />
+ <col style="text-align: left;" />
+ </colgroup>
+ <tr>
+ <th>Element</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>appender</td>
+ <td>
+ Zero or more elements allowed. Defines an appender.
+ </td>
+ </tr>
+ <tr>
+ <td>logger</td>
+ <td>
+ Zero or more elements allowed. Defines the configuration of a logger.
+ </td>
+ </tr>
+ <tr>
+ <td>renderer</td>
+ <td>
+ Zero or more elements allowed. Defines an object renderer.
+ </td>
+ </tr>
+ <tr>
+ <td>root</td>
+ <td>
+ Optional element, maximum of one allowed. Defines the configuration of the root logger.
+ </td>
+ </tr>
+ <tr>
+ <td>param</td>
+ <td>
+ Zero or more elements allowed. Repository specific parameters
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <section id="appenders" name="Appenders">
+ <p>
+ Appenders may only be defined as child elements of the <span class="code"><log4net></span>
+ element. Each appender must be uniquely named. The implementing type for the appender must be specified.
+ </p>
+ <p>
+ This example shows an appender of type <span class="code">log4net.Appender.ConsoleAppender</span> being
+ defined. The appender will be known as <i>ConsoleAppender</i>.
+ </p>
+ <source language="xml"><![CDATA[
+<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" >
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" />
+ </layout>
+</appender>]]></source>
+
+ <p>
+ The <span class="code"><appender></span> element supports the following attributes:
+ </p>
+ <div class="table">
+ <table>
+ <colgroup>
+ <col style="text-align: left; white-space: nowrap; width: 7em" />
+ <col style="text-align: left;" />
+ </colgroup>
+ <tr>
+ <th>Attribute</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>name</td>
+ <td>
+ Required attribute. Value must be a string name for this appender. The name must be unique
+ among all the appenders defined in this configuration file. This name is used by the
+ <span class="code"><appender-ref></span> element of a Logger to reference an appender.
+ </td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>
+ Required attribute. Value must be the type name for this appender. If the appender is
+ not defined in the log4net assembly this type name must be fully assembly qualified.
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ The <span class="code"><appender></span> element supports the following child elements:
+ </p>
+ <div class="table">
+ <table>
+ <colgroup>
+ <col style="text-align: left; white-space: nowrap; width: 7em" />
+ <col style="text-align: left;" />
+ </colgroup>
+ <tr>
+ <th>Element</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>appender-ref</td>
+ <td>
+ Zero or more elements allowed. Allows the appender to reference other appenders.
+ Not supported by all appenders.
+ </td>
+ </tr>
+ <tr>
+ <td>filter</td>
+ <td>
+ Zero or more elements allowed. Defines the filters used by this appender.
+ </td>
+ </tr>
+ <tr>
+ <td>layout</td>
+ <td>
+ Optional element, maximum of one allowed. Defines the layout used by this appender.
+ </td>
+ </tr>
+ <tr>
+ <td>param</td>
+ <td>
+ Zero or more elements allowed. Appender specific parameters.
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <p>
+ For examples of configuring appenders see the
+ <a href="../config-examples.html">Example Appender Configuration</a>
+ document.
+ </p>
+
+ <section id="filters" name="Filters">
+ <p>
+ Filters elements may only be defined as children of <span class="code"><appender></span> elements.
+ </p>
+ <p>
+ The <span class="code"><filter></span> element supports the following attributes:
+ </p>
+ <div class="table">
+ <table>
+ <colgroup>
+ <col style="text-align: left; white-space: nowrap; width: 7em" />
+ <col style="text-align: left;" />
+ </colgroup>
+ <tr>
+ <th>Attribute</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>
+ Required attribute. Value must be the type name for this filter. If the filter is
+ not defined in the log4net assembly this type name must be fully assembly qualified.
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ The <span class="code"><filter></span> element supports the following child elements:
+ </p>
+ <div class="table">
+ <table>
+ <colgroup>
+ <col style="text-align: left; white-space: nowrap; width: 7em" />
+ <col style="text-align: left;" />
+ </colgroup>
+ <tr>
+ <th>Element</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>param</td>
+ <td>
+ Zero or more elements allowed. Filter specific parameters.
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <p>
+ Filters form a chain that the event has to pass through. Any filter along the way can accept the event
+ and stop processing, deny the event and stop processing, or allow the event on to the next filter.
+ If the event gets to the end of the filter chain without being denied it is implicitly accepted and will be logged.
+ </p>
+ <source language="xml"><![CDATA[
+<filter type="log4net.Filter.LevelRangeFilter">
+ <levelMin value="INFO" />
+ <levelMax value="FATAL" />
+</filter>]]></source>
+ <p>
+ This filter will deny events that have a level that is lower than <span class="code">INFO</span>
+ or higher than <span class="code">FATAL</span>.
+ All events between <span class="code">INFO</span> and <span class="code">FATAL</span> will be logged.
+ </p>
+ <p>
+ If we want to only allow messages through that have a specific substring (e.g. 'database')
+ then we need to specify the following filters:
+ </p>
+ <source language="xml"><![CDATA[
+<filter type="log4net.Filter.StringMatchFilter">
+ <stringToMatch value="database" />
+</filter>
+<filter type="log4net.Filter.DenyAllFilter" />]]></source>
+ <p>
+ The first filter will look for the substring 'database' in the message text of the event.
+ If the text is found the filter will accept the message and filter processing will stop,
+ the message will be logged. If the substring is not found the event will be passed to
+ the next filter to process. If there is no next filter the event would be implicitly
+ accepted and would be logged. But because we don't want the non matching events to be
+ logged we need to use a <span class="code">log4net.Filter.DenyAllFilter</span>
+ that will just deny all events that reach it. This filter is only useful at the end of the filter chain.
+ </p>
+ <p>
+ If we want to allow events that have either 'database' or 'ldap' in the message text we can use the following filters:
+ </p>
+ <source language="xml"><![CDATA[
+<filter type="log4net.Filter.StringMatchFilter">
+ <stringToMatch value="database"/>
+</filter>
+<filter type="log4net.Filter.StringMatchFilter">
+ <stringToMatch value="ldap"/>
+</filter>
+<filter type="log4net.Filter.DenyAllFilter" />]]></source>
+ </section>
+
+ <section id="layouts" name="Layouts">
+ <p>
+ Layout elements may only be defined as children of <span class="code"><appender></span> elements.
+ </p>
+ <p>
+ The <span class="code"><layout></span> element supports the following attributes:
+ </p>
+ <div class="table">
+ <table>
+ <colgroup>
+ <col style="text-align: left; white-space: nowrap; width: 7em" />
+ <col style="text-align: left;" />
+ </colgroup>
+ <tr>
+ <th>Attribute</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>
+ Required attribute. Value must be the type name for this layout. If the layout is
+ not defined in the log4net assembly this type name must be fully assembly qualified.
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ The <span class="code"><layout></span> element supports the following child elements:
+ </p>
+ <div class="table">
+ <table>
+ <colgroup>
+ <col style="text-align: left; white-space: nowrap; width: 7em" />
+ <col style="text-align: left;" />
+ </colgroup>
+ <tr>
+ <th>Element</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>param</td>
+ <td>
+ Zero or more elements allowed. Layout specific parameters.
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ This example shows how to configure a layout that uses the <span class="code">log4net.Layout.PatternLayout</span>.
+ </p>
+ <source language="xml"><![CDATA[
+<layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" />
+</layout>]]></source>
+
+ </section>
+ </section>
+
+ <section id="root" name="Root Logger">
+ <p>
+ Only one root logger element may only be defined and it must be a child of <span class="code"><log4net></span> element.
+ The root logger is the root of the logger hierarchy. All loggers ultimately inherit from this logger.
+ </p>
+ <p>
+ An example root logger:
+ </p>
+ <source language="xml"><![CDATA[
+<root>
+ <level value="INFO" />
+ <appender-ref ref="ConsoleAppender" />
+</root>]]></source>
+
+ <p>
+ The <span class="code"><root></span> element supports no attributes.
+ </p>
+ <p>
+ The <span class="code"><root></span> element supports the following child elements:
+ </p>
+ <div class="table">
+ <table>
+ <colgroup>
+ <col style="text-align: left; white-space: nowrap; width: 7em" />
+ <col style="text-align: left;" />
+ </colgroup>
+ <tr>
+ <th>Element</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>appender-ref</td>
+ <td>
+ Zero or more elements allowed. Allows the logger to reference appenders by name.
+ </td>
+ </tr>
+ <tr>
+ <td>level</td>
+ <td>
+ Optional element, maximum of one allowed. Defines the logging level for this logger.
+ This logger will only accept event that are at this level or above.
+ </td>
+ </tr>
+ <tr>
+ <td>param</td>
+ <td>
+ Zero or more elements allowed. Logger specific parameters.
+ </td>
+ </tr>
+ </table>
+ </div>
+ </section>
+
+ <section id="loggers" name="Loggers">
+ <p>
+ Logger elements may only be defined as children of the <span class="code"><log4net></span> element.
+ </p>
+ <p>
+ An example logger:
+ </p>
+ <source language="xml"><![CDATA[
+<logger name="LoggerName">
+ <level value="DEBUG" />
+ <appender-ref ref="ConsoleAppender" />
+</logger>]]></source>
+
+ <p>
+ The <span class="code"><logger></span> element supports the following attributes.
+ </p>
+ <div class="table">
+ <table>
+ <colgroup>
+ <col style="text-align: left; white-space: nowrap; width: 7em" />
+ <col style="text-align: left;" />
+ </colgroup>
+ <tr>
+ <th>Attribute</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>name</td>
+ <td>
+ Required attribute. Value must be the name of the logger.
+ </td>
+ </tr>
+ <tr>
+ <td>additivity</td>
+ <td>
+ Optional attribute. Value may be either <span class="code">true</span> or <span class="code">false</span>.
+ The default value is <span class="code">true</span>. Set this attribute to <span class="code">false</span>
+ to prevent this logger from inheriting the appenders defined on parent loggers.
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ The <span class="code"><logger></span> element supports the following child elements:
+ </p>
+ <div class="table">
+ <table>
+ <colgroup>
+ <col style="text-align: left; white-space: nowrap; width: 7em" />
+ <col style="text-align: left;" />
+ </colgroup>
+ <tr>
+ <th>Element</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>appender-ref</td>
+ <td>
+ Zero or more elements allowed. Allows the logger to reference appenders by name.
+ </td>
+ </tr>
+ <tr>
+ <td>level</td>
+ <td>
+ Optional element, maximum of one allowed. Defines the logging level for this logger.
+ This logger will only accept event that are at this level or above.
+ </td>
+ </tr>
+ <tr>
+ <td>param</td>
+ <td>
+ Zero or more elements allowed. Logger specific parameters.
+ </td>
+ </tr>
+ </table>
+ </div>
+ </section>
+
+ <section id="renderers" name="Renderers">
+ <p>
+ Renderer elements may only be defined as children of the <span class="code"><log4net></span> element.
+ </p>
+ <p>
+ An example renderer:
+ </p>
+ <source language="xml"><![CDATA[
+<renderer renderingClass="MyClass.MyRenderer" renderedClass="MyClass.MyFunkyObject" />]]></source>
+
+ <p>
+ The <span class="code"><renderer></span> element supports the following attributes.
+ </p>
+ <div class="table">
+ <table>
+ <colgroup>
+ <col style="text-align: left; white-space: nowrap; width: 7em" />
+ <col style="text-align: left;" />
+ </colgroup>
+ <tr>
+ <th>Attribute</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>renderingClass</td>
+ <td>
+ Required attribute. Value must be the type name for this renderer. If the type is
+ not defined in the log4net assembly this type name must be fully assembly qualified.
+ This is the type of the object that will take responsibility for rendering the
+ <i>renderedClass</i>.
+ </td>
+ </tr>
+ <tr>
+ <td>renderedClass</td>
+ <td>
+ Required attribute. Value must be the type name for the target type for this renderer. If the type is
+ not defined in the log4net assembly this type name must be fully assembly qualified.
+ This is the name of the type that this renderer will render.
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ The <span class="code"><renderer></span> element supports no child elements.
+ </p>
+ </section>
+
+ <section id="param" name="Parameters">
+ <p>
+ Parameter elements may be children of many elements. See the specific elements above for details.
+ </p>
+ <p>
+ An example param:
+ </p>
+ <source language="xml"><![CDATA[
+<param name="ConversionPattern" value="%date [%thread] %-5level %logger [%ndc] - %message%newline" />]]></source>
+
+ <p>
+ The <span class="code"><param></span> element supports the following attributes.
+ </p>
+ <div class="table">
+ <table>
+ <colgroup>
+ <col style="text-align: left; white-space: nowrap; width: 7em" />
+ <col style="text-align: left;" />
+ </colgroup>
+ <tr>
+ <th>Attribute</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>name</td>
+ <td>
+ Required attribute. Value must be the name of the parameter to set on the parent object.
+ </td>
+ </tr>
+ <tr>
+ <td>value</td>
+ <td>
+ Optional attribute. One of <i>value</i> or <i>type</i> attributes must be specified.
+ The value of this attribute is a string that can be converted to the value of the
+ parameter.
+ </td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>
+ Optional attribute. One of <i>value</i> or <i>type</i> attributes must be specified.
+ The value of this attribute is a type name to create and set as the value of the
+ parameter. If the type is not defined in the log4net assembly this type name must
+ be fully assembly qualified.
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ The <span class="code"><param></span> element supports the following child elements:
+ </p>
+ <div class="table">
+ <table>
+ <colgroup>
+ <col style="text-align: left; white-space: nowrap; width: 7em" />
+ <col style="text-align: left;" />
+ </colgroup>
+ <tr>
+ <th>Element</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>param</td>
+ <td>
+ Zero or more elements allowed. Parameter specific parameters.
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ An example param that uses nested param elements:
+ </p>
+ <source language="xml"><![CDATA[
+<param name="evaluator" type="log4net.spi.LevelEvaluator">
+ <param name="Threshold" value="WARN"/>
+<param>]]></source>
+
+ <section id="extension" name="Extension Parameters">
+ <p>
+ Configuration parameters map directly to writable properties on an object.
+ The properties available depend on the actual type of the object being
+ configured. The log4net SDK documentation contains the API reference for
+ all the components included in the log4net assembly.
+ </p>
+ <p>
+ For 3rd party components please see their relevant API reference for
+ details of the properties available.
+ </p>
+ </section>
+
+ <section id="new-param" name="Compact Parameter Syntax">
+ <p>
+ All parameters may alternately be specified using the parameter name as the element name
+ rather than using the <i>param</i> element and <i>name</i> attribute.
+ </p>
+ <p>
+ For example a param:
+ </p>
+ <source language="xml"><![CDATA[
+<param name="evaluator" type="log4net.spi.LevelEvaluator">
+ <param name="Threshold" value="WARN"/>
+<param>]]></source>
+ <p>
+ may be written as:
+ </p>
+ <source language="xml"><![CDATA[
+<evaluator type="log4net.spi.LevelEvaluator">
+ <threshold value="WARN"/>
+<evaluator>]]></source>
+ </section>
+ </section>
+ </section>
+
+ </section>
+
+ </section>
+ </body>
+</document>
diff --git a/src/site/xdoc/release/manual/contexts.xml b/src/site/xdoc/release/manual/contexts.xml
new file mode 100644
index 0000000..54cf328
--- /dev/null
+++ b/src/site/xdoc/release/manual/contexts.xml
@@ -0,0 +1,249 @@
+<?xml version="1.0" ?>
+<!--
+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.
+-->
+<document>
+
+ <properties>
+ <author email="nicko at apache dot org">Nicko Cadell</author>
+ <title>Apache log4net Manual: Contexts</title>
+ </properties>
+
+ <meta name="keywords" content="building log4net, log4net" />
+
+ <body>
+ <section id="main" name="Apache log4net™ Manual - Contexts">
+ <p>
+ Most real-world systems have to deal with multiple clients simultaneously. In a
+ typical multithreaded implementation of such a system, different threads will
+ handle different clients. Logging is especially well suited to trace and debug
+ complex distributed applications. An approach to differentiate the
+ logging output of one client from another is to instantiate a new separate
+ logger for each client. However this promotes the proliferation of loggers and
+ increases the management overhead of logging.
+ </p>
+ <p>
+ A lighter technique is to uniquely stamp each log request initiated from the
+ same client interaction.
+ </p>
+ <p>
+ Log4net supports different types of contextual logging and contexts with different scopes.
+ </p>
+
+ <section id="scopes" name="Scopes">
+ <p>
+ Contextual data can be set in different scopes. These contexts have progressively narrower visibility.
+ In the logging event itself the values from all of the contexts are combined together such that
+ values specified in a lower scoped context hide values from a higher context.
+ </p>
+
+ <div class="table">
+ <table>
+ <tr>
+ <th>Scope</th>
+ <th>Type</th>
+ <th>Description</th>
+ </tr>
+ <tr align="left">
+ <td>Global</td>
+ <td><span class="code">log4net.GlobalContext</span></td>
+ <td>
+ The global context is shared by all threads in the current AppDomain.
+ This context is thread safe for use by multiple threads concurrently.
+ </td>
+ </tr>
+ <tr align="left">
+ <td>Thread</td>
+ <td><span class="code">log4net.ThreadContext</span></td>
+ <td>
+ The thread context is visible only to the current managed thread.
+ </td>
+ </tr>
+ <tr align="left">
+ <td>Logical Thread</td>
+ <td><span class="code">log4net.LogicalThreadContext</span></td>
+ <td>
+ The logical thread context is visible to a logical thread. Logical
+ threads can jump from one managed thread to another. For more details
+ see the .NET API <span
+ class="code">System.Runtime.Remoting.Messaging.CallContext</span>.<br></br>
+ For .NET Standard this uses <span
+ class="code">AsyncLocal</span> rather
+ than <span class="code">CallContext</span>.
+ </td>
+ </tr>
+ <tr align="left">
+ <td>Event</td>
+ <td><span class="code">log4net.Core.LoggingEvent</span></td>
+ <td>
+ Each event captures the current contextual state at the time the event
+ is generated. Contextual data can be set on the event itself. This context
+ is only visible to the code generating the event itself.
+ </td>
+ </tr>
+ </table>
+ </div>
+ </section>
+
+ <section id="properties" name="Context Properties">
+ <p>
+ The log4net contexts store properties, i.e. name value pairs. The name is a string
+ the value is any object. A property can be set as follows:
+ </p>
+ <source language="c#"><![CDATA[
+log4net.GlobalContext.Properties["name"] = value;
+]]></source>
+ <p>
+ If properties with the same name are set in more than one context scope then
+ the value in the narrowest scope (lower down in the list above) will hide the
+ other values.
+ </p>
+ <p>
+ The property values are stored as objects within the <span class="code">LoggingEvent</span>.
+ The <span class="code">PatternLayout</span> supports rendering the value of a named
+ property using the <span class="code">%property{name}</span> syntax. The value is
+ converted to a string by passing it to the <span class="code">log4net.ObjectRenderer.RendererMap</span>
+ which will locate any custom renderer for the value type. The default behavior for
+ custom types is to call the object's <span class="code">ToString()</span> method.
+ </p>
+
+ <section id="active" name="Active Property Values">
+ <p>
+ An active property value is one who's value changes over time.
+ </p>
+ <p>
+ For example, imagine a custom type that implemented the
+ <span class="code">ToString()</span> method to return the
+ number of bytes allocated by the runtime garbage collector.
+ </p>
+ <source language="c#"><![CDATA[
+public class GCAllocatedBytesHelper
+{
+ public override string ToString()
+ {
+ return GC.GetTotalMemory(true).ToString();
+ }
+}]]></source>
+ <p>
+ An instance of this type can be added to the <span class="code">log4net.GlobalContext</span>
+ during application startup:
+ </p>
+ <source language="c#"><![CDATA[
+log4net.GlobalContext.Properties["GCAllocatedBytes"] = new GCAllocatedBytesHelper();
+]]></source>
+ <p>
+ Once this property is set in the context all subsequent logging events will have a property
+ called <i>GCAllocatedBytes</i>. The value of the property will be an instance of the
+ <span class="code">GCAllocatedBytesHelper</span> type. When this value is rendered to a
+ string by calling the <span class="code">ToString</span> method the current number of bytes
+ allocated by the garbage collector will be returned and included in the output.
+ </p>
+
+ </section>
+
+ </section>
+
+ <section id="stacks" name="Context Stacks">
+ <p>
+ Sometimes simple key value pairs are not the most convenient way of capturing contextual
+ information. A stack of information is a very convenient way of storing data especially
+ as our applications tend to be stack based.
+ </p>
+ <p>
+ The <span class="code">ThreadContext</span> and <span class="code">LogicalThreadContext</span>
+ also support storing contextual data in a stack. The stack is stored in context property,
+ therefore stacks have names and more than one stack can exist in the same context. A property
+ value set in a narrower context would override a stack with the same property name set in a
+ wider scoped context.
+ </p>
+ <p>
+ The stack supports <span class="code">Push</span> and <span class="code">Pop</span> methods.
+ As more contextual data is pushed onto the stack the stack grows. When the stack is rendered
+ all the data pushed onto the stack is output with the most recent data to the right hand
+ end of the string.
+ </p>
+ <p>
+ As the stack is just an object stored in the context properties it is also rendered
+ using the same <span class="code">PatternLayout</span> syntax: <span class="code">%property{name}</span>.
+ Where <i>name</i> is the name of the stack.
+ </p>
+ <p>
+ Calls the the stack's <span class="code">Push</span> and <span class="code">Pop</span>
+ methods must be matched up so that each push has a corresponding pop. The
+ <span class="code">Push</span> method also returns an <span class="code">IDisposable</span>
+ object that will perform the required pop operation when it is disposed. This allows
+ the C# <i>using</i> syntax to be used to automate the stack management.
+ </p>
+ <source language="c#"><![CDATA[
+using(log4net.ThreadContext.Stacks["NDC"].Push("context"))
+{
+ log.Info("Message");
+}
+]]></source>
+ <p>
+ The INFO level log has a stack stored in its <i>NDC</i> property. The top item in the
+ stack is the string <i>context</i>.
+ The <i>using</i> syntax ensures that the value <i>context</i> is popped off the stack
+ at the end of the block.
+ </p>
+ <p>
+ The <span class="code">using</span>
+ syntax is recommended because it removes some work load from the developer and
+ reduces errors in matching up the Push and Pop calls, especially when exceptions
+ can occur.
+ </p>
+ </section>
+
+ <section id="ndc" name="Nested Diagnostic Contexts">
+ <p>
+ The <span class="code">NDC</span> (Nested Diagnostic Context) exists for compatibility
+ with older versions of log4net. This helper class implements a stack which is stored
+ in the thread context property named <i>NDC</i>.
+ </p>
+ </section>
+
+ <section id="mdc" name="Mapped Diagnostic Contexts">
+ <p>
+ The <span class="code">MDC</span> (MappedDiagnostic Context) exists for compatibility
+ with older versions of log4net. This helper class implements a properties map which is
+ mapped directly through to the thread context properties.
+ </p>
+ </section>
+
+ <p>
+ To illustrate this point, let us take the example of a web service delivering
+ content to numerous clients. The web service can build the <span class="code">NDC</span> at the very
+ beginning of the request before executing other code. The contextual
+ information can be the client's host name and other information inherent to the
+ request, typically information contained in cookies. Hence, even if the web
+ service is serving multiple clients simultaneously, the logs initiated by the
+ same code, i.e. belonging to the same logger, can still be distinguished
+ because each client request will have a different <span class="code">NDC</span> stack. Contrast this with
+ the complexity of passing a freshly instantiated logger to all code exercised
+ during the client's request.
+ </p>
+ <p>
+ Nevertheless, some sophisticated applications, such as virtual hosting web
+ servers, must log differently depending on the virtual host context and also
+ depending on the software component issuing the request. Log4net supports
+ multiple logger repositories. This would allow each virtual host to possess its own copy
+ of the logger hierarchy. Configuring multiple logger hierarchies is beyond the
+ scope of this document.
+ </p>
+
+ </section>
+ </body>
+</document>
diff --git a/src/site/xdoc/release/manual/internals.xml b/src/site/xdoc/release/manual/internals.xml
new file mode 100644
index 0000000..cba3e59
--- /dev/null
+++ b/src/site/xdoc/release/manual/internals.xml
@@ -0,0 +1,259 @@
+<?xml version="1.0" ?>
+<!--
+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.
+-->
+<document>
+
+ <properties>
+ <author email="nicko at apache dot org">Nicko Cadell</author>
+ <title>Apache log4net Manual: Internals</title>
+ </properties>
+
+ <meta name="keywords" content="log4net internals, log4net" />
+
+ <body>
+ <section id="main" name="Apache log4net™ Manual - Internals">
+ <section id="perf" name="Performance">
+ <p>
+ One of the often-cited arguments against logging is its computational cost.
+ This is a legitimate concern as even moderately sized applications can generate
+ thousands of log requests. Much effort was spent measuring and tweaking logging
+ performance. Log4net claims to be fast and flexible: speed first, flexibility
+ second.
+ </p>
+ <p>
+ The user should be aware of the following performance issues.
+ </p>
+ <ol>
+ <li>
+ <strong>Logging performance when logging is turned off.</strong>
+ <p>
+ When logging is turned off entirely or just for a set of levels, the cost of a
+ log request consists of a method invocation plus an integer comparison.
+ </p>
+ <p>
+ However, The method invocation involves the "hidden" cost of parameter
+ construction.
+ </p>
+ <p>
+ For example, for some logger
+ <span class="code">log</span>, writing,
+ </p>
+ <div class="syntax"><pre class="code">
+log.Debug("Entry number: " + i + " is " + entry[i].ToString());</pre></div>
+ <p>
+ incurs the cost of constructing the message parameter, i.e. converting both
+ integer
+ <span class="code">i</span>
+ and
+ <span class="code">entry[i]</span>
+ to strings, and concatenating intermediate strings, regardless of whether the
+ message will be logged or not. This cost of parameter construction can be quite
+ high and it depends on the number and type of the parameters involved.
+ </p>
+ <p>
+ To avoid the parameter construction cost write:
+ </p>
+ <div class="syntax"><pre class="code">
+if(log.IsDebugEnabled)
+{
+ log.Debug("Entry number: " + i + " is " + entry[i].ToString());
+}</pre></div>
+ <p>
+ This will not incur the cost of parameter construction if debugging is
+ disabled. On the other hand, if the logger is debug-enabled, it will incur
+ twice the cost of evaluating whether the logger is enabled or not: once in
+ <span class="code">IsDebugEnabled</span>
+ and once in
+ <span class="code">Debug</span>. This is an insignificant overhead because
+ evaluating a logger takes about 1% of the time it takes to actually log.
+ </p>
+ <p>
+ Certain users resort to pre-processing or compile-time techniques to compile
+ out all log statements. This leads to perfect performance efficiency with
+ respect to logging. However, since the resulting application binary does not
+ contain any log statements, logging cannot be turned on for that binary. In
+ many people's opinion this is a disproportionate price to pay in exchange for a
+ small performance gain.
+ </p>
+ </li>
+ <li>
+ <strong>The performance of deciding whether to log or not to log when logging is
+ turned on.</strong>
+ <p>
+ This is essentially the performance of walking the logger hierarchy. When
+ logging is turned on, log4net still needs to compare the level of the log
+ request with the level of the request logger. However, loggers may not have an
+ assigned level; they can inherit them from the logger hierarchy. Thus, before
+ inheriting a level, the logger may need to search its ancestors.
+ </p>
+ <p>
+ There has been a serious effort to make this hierarchy walk to be as fast as
+ possible. For example, child loggers link only to their existing ancestors. In
+ the
+ <span class="code">BasicConfigurator</span>
+ example shown earlier, the logger named
+ <span class="code">Com.Foo.Bar</span>
+ is linked directly to the <i>root</i> logger, thereby circumventing the nonexistent
+ <span class="code">Com</span>
+ or
+ <span class="code">Com.Foo</span>
+ loggers. This significantly improves the speed of the walk, especially in
+ "sparse" hierarchies.
+ </p>
+ <p>
+ The typical cost of walking the hierarchy is typically 3 times slower than when
+ logging is turned off entirely.
+ </p>
+ </li>
+ <li>
+ <strong>Actually outputting log messages</strong>
+ <p>
+ This is the cost of formatting the log output and sending it to its target
+ destination. Here again, a serious effort was made to make layouts (formatters)
+ perform as quickly as possible. The same is true for appenders.
+ </p>
+ </li>
+ </ol>
+ <p>
+ Although log4net has many features, its first design goal was speed. Some
+ log4net components have been rewritten many times to improve performance.
+ Nevertheless, contributors frequently come up with new optimizations. You
+ should be pleased to know that when configured with the
+ <span class="code">SimpleLayout</span>
+ performance tests have shown log4net to log within an order of magnitude of
+ <span class="code">System.Console.WriteLine</span>.
+ </p>
+ </section>
+
+ <section id="flow" name="Logging Event Flow">
+ <p>
+ The following is the series of steps and checks that a messages goes through while being logged.
+ For the purposes of this example we will document an <span class="code">INFO</span> level
+ message being logged on logger <i>ConsoleApp.LoggingExample</i>. This logger is configured
+ to use the <span class="code">log4net.Appender.ConsoleAppender</span>. The repository used
+ in this example is a <span class="code">log4net.Repository.Hierarchy</span> object.
+ </p>
+ <ol>
+ <li>
+ <p>
+ The user logs a message using the <span class="code">ILog.Info</span> method on the logger
+ obtained using a call to <span class="code">log4net.LogManager.GetLogger("ConsoleApp.LoggingExample")</span>.
+ For example: <span class="code">log4net.LogManager.GetLogger("ConsoleApp.LoggingExample").Info("Application Start");</span>
+ The <span class="code">ILog</span> interface is actually an extension to log4net that provides level
+ specific logging methods (i.e. Debug, Info, Warn, Error, and Fatal).
+ </p>
+ </li>
+ <li>
+ <p>
+ The message is then logged through to the <span class="code">ILogger.Log</span> method on the
+ appropriate <span class="code">log4net.Repository.Hierarchy.Logger</span> object. The
+ <span class="code">ILogger.Log</span> method takes the <span class="code">Level</span> to
+ log at as a parameter and therefore works for all levels.
+ </p>
+ </li>
+ <li>
+ <p>
+ The repository threshold level is compared to the message level to determine if the message
+ can be logged. If the message level is below the threshold level the message is not logged.
+ In this case the repository is a <span class="code">log4net.Repository.Hierarchy</span> object.
+ </p>
+ </li>
+ <li>
+ <p>
+ The <span class="code">Logger</span> level is compared to the message level to determine if the
+ message can be logged. Note that the <span class="code">Logger</span> level is inherited from a
+ parent <span class="code">Logger</span> if not specified explicitly for this <span class="code">Logger</span>.
+ If the message level is below the <span class="code">Logger</span> level the message is not logged.
+ </p>
+ </li>
+ <li>
+ <p>
+ A <span class="code">LoggingEvent</span> instance is created to encapsulate the message being logged.
+ </p>
+ </li>
+ <li>
+ <p>
+ The list of appenders for the <span class="code">Logger</span> is built. This includes appenders
+ attached to parent <span class="code">Logger</span>s except where excluded by the
+ <span class="code">Logger.Additivity</span> property.
+ </p>
+ </li>
+ <li>
+ <p>
+ The <span class="code">LoggingEvent</span> object is passed to the
+ <span class="code">IAppender.DoAppend</span> method for each appender.
+ </p>
+ </li>
+ </ol>
+ <p>
+ For Each Appender that the <span class="code">LoggingEvent</span> is delivered to the following
+ actions take place:
+ </p>
+ <ol>
+ <li>
+ <p>
+ The appender threshold level is compared to the message level to determine if the message
+ can be logged. If the message level is below the threshold level the message is not logged.
+ </p>
+ </li>
+ <li>
+ <p>
+ If the appender has a filter chain the <span class="code">LoggingEvent</span> is passed down the
+ filter chain which can decide if the message can be logged or not.
+ </p>
+ </li>
+ <li>
+ <p>
+ Next an appender specific check is performed. Usually this check will verify that all the
+ required properties are set for the appender (e.g. a <span class="code">Layout</span> is set if required).
+ </p>
+ </li>
+ <li>
+ <p>
+ The <span class="code">LoggingEvent</span> is passed to the appender specific
+ <span class="code">Append</span> method. What happens now is specific to the appender.
+ </p>
+ </li>
+ </ol>
+ <p>
+ The following actions take place in the <span class="code">ConsoleAppender.Append</span> method:
+ </p>
+ <ol>
+ <li>
+ <p>
+ The <span class="code">ConsoleAppender</span> uses a <span class="code">Layout</span> to
+ format the message as a string for display.
+ </p>
+ </li>
+ <li>
+ <p>
+ The <span class="code">Layout</span> uses the <span class="code">LoggingEvent.RenderedMessage</span>
+ property to get the string for the message object. This uses the registered
+ <span class="code">IObjectRenderer</span> for the type of the message object.
+ </p>
+ </li>
+ <li>
+ <p>
+ The message text is displayed on the console using the <span class="code">Console.WriteLine</span> method.
+ </p>
+ </li>
+ </ol>
+ </section>
+
+ </section>
+ </body>
+</document>
diff --git a/src/site/xdoc/release/manual/introduction.xml b/src/site/xdoc/release/manual/introduction.xml
new file mode 100644
index 0000000..4a2b750
--- /dev/null
+++ b/src/site/xdoc/release/manual/introduction.xml
@@ -0,0 +1,1031 @@
+<?xml version="1.0" ?>
+<!--
+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.
+-->
+<document>
+
+ <properties>
+ <author email="nicko at apache dot org">Nicko Cadell</author>
+ <title>Apache log4net Manual: Introduction</title>
+ </properties>
+
+ <meta name="keywords" content="log4net manual, log4net" />
+
+ <body>
+ <section id="main" name="Apache log4net™ Manual - Introduction">
+ <section id="overview" name="Overview">
+ <p>
+ This document is based on <i>Short introduction to log4j</i> by <i>Ceki Gülcü</i>.
+ </p>
+ <p>
+ The log4net framework is based on Apache log4j™, see <a href="http://logging.apache.org/log4j/">
+ http://logging.apache.org/log4j/</a> for more information on log4j.
+ The log4net framework, source code, binaries, documentation, examples and related
+ materials are published under the terms of the
+ <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>,
+ a copy of which has been included with this distribution in the LICENSE.txt file.
+ </p>
+ <p>
+ This document is an introduction to the log4net API, its unique features and
+ design rationale. Log4net is an open source project based on the work of many
+ authors. It allows the developer to control which log statements are output
+ with arbitrary granularity. It is fully configurable at runtime using external
+ configuration files.
+ </p>
+ <p>
+ Almost every large application includes its own logging or tracing API.
+ Inserting log statements into code is a low-tech method for debugging it. It
+ may also be the only way because debuggers are not always available or
+ applicable. This is usually the case for multithreaded applications and
+ distributed applications at large.
+ </p>
+ <p>
+ Once an application has been deployed it may not be possible to utilize
+ development and debugging tools. An administrator can use effective logging
+ systems to diagnose and fix many configuration issues.
+ </p>
+ <p>
+ Experience indicates that logging is an important component of the development
+ cycle. It offers several advantages. It provides precise <i>context</i> about the
+ execution of the application. Once inserted into the code, the generation of
+ logging output requires no human intervention. Moreover, log output can be
+ saved in persistent medium to be studied at a later time. In addition to its
+ use in the development cycle, a sufficiently rich logging package can also be
+ viewed as an auditing tool.
+ </p>
+ <p>
+ Logging does have its drawbacks. It can slow down an application. If too
+ verbose, it can cause scrolling blindness. To alleviate these concerns, log4net
+ is designed to be reliable, fast and extensible. Since logging is rarely the
+ main focus of an application, the log4net API strives to be simple to
+ understand and to use.
+ </p>
+ </section>
+
+ <section id="frameworks" name="Frameworks">
+ <p>
+ Log4net is available for several frameworks. For each supported framework an
+ assembly targeting that framework is built:
+ </p>
+ <ul>
+ <li>.NET Standard 1.3 via .NET Core 1.0</li>
+ <li>Microsoft® .NET Framework 1.0</li>
+ <li>Microsoft .NET Framework 1.1</li>
+ <li>Microsoft .NET Framework 2.0</li>
+ <li>Microsoft .NET Framework 3.5</li>
+ <li>Microsoft .NET Framework 4.0</li>
+ <li>Microsoft .NET Framework 4.5</li>
+ <li>Microsoft .NET Framework 3.5 Client Profile</li>
+ <li>Microsoft .NET Framework 4.0 Client Profile</li>
+ <li>Microsoft .NET Compact Framework 1.0</li>
+ <li>Microsoft .NET Compact Framework 2.0</li>
+ <li>Mono 1.0</li>
+ <li>Mono 2.0</li>
+ <li>Mono 3.5</li>
+ <li>Mono 4.0</li>
+ <li>Microsoft Shared Source CLI 1.0</li>
+ <li>CLI 1.0 Compatible</li>
+ </ul>
+ <p>
+ Not all frameworks are created equal and some features have been excluded from
+ some of the builds. See the <a href="../framework-support.html">Framework Support</a>
+ document for more information.
+ </p>
+ </section>
+
+ <section id="loggers" name="Loggers and Appenders">
+ <p>
+ Log4net has three main components: <i>loggers</i>, <i>appenders</i> and <i>layouts</i>.
+ These three types of components work together to enable developers to log
+ messages according to message type and level, and to control at runtime how
+ these messages are formatted and where they are reported. These components are
+ helped by <i>filters</i> that control the actions of the appender and
+ <i>object renderers</i> that turn objects into strings.
+ </p>
+
+ <section id="hierarchy" name="Logger hierarchy">
+ <p>
+ The first and foremost advantage of any logging API over plain
+ <span class="code">System.Console.WriteLine</span>
+ resides in its ability to disable certain log statements while allowing others
+ to print unhindered. This capability assumes that the logging space, that is,
+ the space of all possible logging statements, is categorized according to some
+ developer-chosen criteria.
+ </p>
+ <p>
+ Loggers are named entities. Logger names are case-sensitive and they follow the
+ following hierarchical naming rule:
+ </p>
+ <dl class="rule">
+ <dt>Named Hierarchy</dt>
+ <dd>
+ <p>
+ A logger is said to be an <i>ancestor</i> of another logger if its name
+ followed by a dot is a prefix of the <i>descendant</i> logger name. A logger is
+ said to be a <i>parent</i> of a <i>child</i> logger if there are no ancestors
+ between itself and the descendant logger.
+ </p>
+ <p>
+ The hierarchy works very much in the same way as the namespace and class
+ hierarchy in .NET. This is very convenient as we shall soon see.
+ </p>
+ </dd>
+ </dl>
+ <p>
+ For example, the logger named
+ <span class="code">"Foo.Bar"</span>
+ is a parent of the logger named
+ <span class="code">"Foo.Bar.Baz"</span>. Similarly,
+ <span class="code">"System"</span>
+ is a parent of
+ <span class="code">"System.Text"</span>
+ and an ancestor of
+ <span class="code">"System.Text.StringBuilder"</span>. This naming scheme
+ should be familiar to most developers.
+ </p>
+ <p>
+ The <i>root</i> logger resides at the top of the logger hierarchy. It is exceptional
+ in three ways:
+ </p>
+ <ol>
+ <li>
+ It always exists</li>
+ <li>
+ It cannot be retrieved by name</li>
+ <li>
+ It always has an assigned level</li>
+ </ol>
+ <p>
+ Loggers are retrieved using the static method from the
+ <span class="code">log4net.LogManager</span>
+ class. The
+ <span class="code">GetLogger</span>
+ methods take the name of the desired logger as a parameter. They are listed
+ below:
+ </p>
+ <source language="C#"><![CDATA[
+namespace log4net
+{
+ public class LogManager
+ {
+ public static ILog GetLogger(string name);
+ public static ILog GetLogger(Type type);
+ }
+}]]></source>
+ <p>
+ The
+ <span class="code">GetLogger</span>
+ methods that takes a
+ <span class="code">Type</span>
+ parameter uses the fully qualified type name as the name of the logger to
+ retrieve.
+ </p>
+ <p>
+ These
+ <span class="code">GetLogger</span>
+ methods return an
+ <span class="code">ILog</span>
+ interface. That is the representation of the <i>Logger</i> passed back to the
+ developer. The
+ <span class="code">ILog</span>
+ interface is defined below:
+ </p>
+ <source language="C#"><![CDATA[
+namespace log4net
+{
+ public interface ILog
+ {
+ /* Test if a level is enabled for logging */
+ bool IsDebugEnabled { get; }
+ bool IsInfoEnabled { get; }
+ bool IsWarnEnabled { get; }
+ bool IsErrorEnabled { get; }
+ bool IsFatalEnabled { get; }
+
+ /* Log a message object */
+ void Debug(object message);
+ void Info(object message);
+ void Warn(object message);
+ void Error(object message);
+ void Fatal(object message);
+
+ /* Log a message object and exception */
+ void Debug(object message, Exception t);
+ void Info(object message, Exception t);
+ void Warn(object message, Exception t);
+ void Error(object message, Exception t);
+ void Fatal(object message, Exception t);
+
+ /* Log a message string using the System.String.Format syntax */
+ void DebugFormat(string format, params object[] args);
+ void InfoFormat(string format, params object[] args);
+ void WarnFormat(string format, params object[] args);
+ void ErrorFormat(string format, params object[] args);
+ void FatalFormat(string format, params object[] args);
+
+ /* Log a message string using the System.String.Format syntax */
+ void DebugFormat(IFormatProvider provider, string format, params object[] args);
+ void InfoFormat(IFormatProvider provider, string format, params object[] args);
+ void WarnFormat(IFormatProvider provider, string format, params object[] args);
+ void ErrorFormat(IFormatProvider provider, string format, params object[] args);
+ void FatalFormat(IFormatProvider provider, string format, params object[] args);
+ }
+}]]></source>
+ <p>
+ Loggers <i>may</i> be assigned levels. Levels are instances of the
+ <span class="code">log4net.Core.Level</span>
+ class. The following levels are defined in order of increasing priority:
+ </p>
+ <ul>
+ <li>
+ <span class="code">ALL</span>
+ </li>
+ <li>
+ <span class="code">DEBUG</span>
+ </li>
+ <li>
+ <span class="code">INFO</span>
+ </li>
+ <li>
+ <span class="code">WARN</span>
+ </li>
+ <li>
+ <span class="code">ERROR</span>
+ </li>
+ <li>
+ <span class="code">FATAL</span>
+ </li>
+ <li>
+ <span class="code">OFF</span>
+ </li>
+ </ul>
+ <p>
+ If a given logger is not assigned a level, then it inherits one from its
+ closest ancestor with an assigned level. More formally:
+ </p>
+ <dl class="rule">
+ <dt>Level Inheritance</dt>
+ <dd>
+ <p>
+ The <i>inherited level</i> for a given logger <i>X</i>, is equal to the first
+ non-null level in the logger hierarchy, starting at <i>X</i> and proceeding
+ upwards in the hierarchy towards the <i>root</i> logger.
+ </p>
+ </dd>
+ </dl>
+ <p>
+ To ensure that all loggers can eventually inherit a level, the <i>root</i> logger
+ always has an assigned level. The default value for the <i>root</i> logger is
+ <span class="code">DEBUG</span>.
+ </p>
+ <p>
+ Below are four tables with various assigned level values and the resulting
+ inherited levels according to the above rule.
+ </p>
+ <p> </p>
+ <div class="table">
+ <table>
+ <tr>
+ <th>
+ Logger name</th>
+ <th>
+ Assigned level</th>
+ <th>
+ Inherited level</th>
+ </tr>
+ <tr align="left">
+ <td><i>root</i></td>
+ <td>Proot</td>
+ <td>Proot</td>
+ </tr>
+ <tr align="left">
+ <td>X</td>
+ <td>none</td>
+ <td>Proot</td>
+ </tr>
+ <tr align="left">
+ <td>X.Y</td>
+ <td>none</td>
+ <td>Proot</td>
+ </tr>
+ <tr align="left">
+ <td>X.Y.Z</td>
+ <td>none</td>
+ <td>Proot</td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ In <i>Example 1</i> above, only the <i>root</i> logger is assigned a level. This level
+ value,
+ <span class="code">Proot</span>, is inherited by the other loggers
+ <span class="code">X</span>,
+ <span class="code">X.Y</span>
+ and
+ <span class="code">X.Y.Z</span>.
+ </p>
+ <p> </p>
+ <div class="table">
+ <table>
+ <tr>
+ <th>
+ Logger name</th>
+ <th>
+ Assigned level</th>
+ <th>
+ Inherited level</th>
+ </tr>
+ <tr align="left">
+ <td><i>root</i></td>
+ <td>Proot</td>
+ <td>Proot</td>
+ </tr>
+ <tr align="left">
+ <td>X</td>
+ <td>Px</td>
+ <td>Px</td>
+ </tr>
+ <tr align="left">
+ <td>X.Y</td>
+ <td>Pxy</td>
+ <td>Pxy</td>
+ </tr>
+ <tr align="left">
+ <td>X.Y.Z</td>
+ <td>Pxyz</td>
+ <td>Pxyz</td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ In <i>Example 2</i> above, all loggers have an assigned level value. There is
+ no need for level inheritance.
+ </p>
+ <p> </p>
+ <div class="table">
+ <table>
+ <tr>
+ <th>
+ Logger name</th>
+ <th>
+ Assigned level</th>
+ <th>
+ Inherited level</th>
+ </tr>
+ <tr align="left">
+ <td><i>root</i></td>
+ <td>Proot</td>
+ <td>Proot</td>
+ </tr>
+ <tr align="left">
+ <td>X</td>
+ <td>Px</td>
+ <td>Px</td>
+ </tr>
+ <tr align="left">
+ <td>X.Y</td>
+ <td>none</td>
+ <td>Px</td>
+ </tr>
+ <tr align="left">
+ <td>X.Y.Z</td>
+ <td>Pxyz</td>
+ <td>Pxyz</td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ In <i>Example 3</i> above, the loggers
+ <i>root</i>,
+ <span class="code">X</span>
+ and
+ <span class="code">X.Y.Z</span>
+ are assigned the levels
+ <span class="code">Proot</span>,
+ <span class="code">Px</span>
+ and
+ <span class="code">Pxyz</span>
+ respectively. The logger
+ <span class="code">X.Y</span>
+ inherits its level value from its parent
+ <span class="code">X</span>.
+ </p>
+ <p> </p>
+ <div class="table">
+ <table>
+ <tr>
+ <th>
+ Logger name</th>
+ <th>
+ Assigned level</th>
+ <th>
+ Inherited level</th>
+ </tr>
+ <tr align="left">
+ <td><i>root</i></td>
+ <td>Proot</td>
+ <td>Proot</td>
+ </tr>
+ <tr align="left">
+ <td>X</td>
+ <td>Px</td>
+ <td>Px</td>
+ </tr>
+ <tr align="left">
+ <td>X.Y</td>
+ <td>none</td>
+ <td>Px</td>
+ </tr>
+ <tr align="left">
+ <td>X.Y.Z</td>
+ <td>none</td>
+ <td>Px</td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ In <i>Example 4</i> above, the loggers <i>root</i> and
+ <span class="code">X</span>
+ and are assigned the levels
+ <span class="code">Proot</span>
+ and
+ <span class="code">Px</span>
+ respectively. The loggers
+ <span class="code">X.Y</span>
+ and
+ <span class="code">X.Y.Z</span>
+ inherits their level value from their nearest parent
+ <span class="code">X</span>
+ having an assigned level.
+ </p>
+ <p>
+ Logging requests are made by invoking one of the printing methods of a logger
+ instance (through the <span class="code">log4net.ILog</span>). These printing methods are
+ <span class="code">Debug</span>,
+ <span class="code">Info</span>,
+ <span class="code">Warn</span>,
+ <span class="code">Error</span>, and
+ <span class="code">Fatal</span>.
+ </p>
+ <p>
+ By definition, the printing method determines the level of a logging request.
+ For example, if
+ <span class="code">log</span>
+ is a logger instance, then the statement
+ <span class="code">log.Info("..")</span>
+ is a logging request of level <span class="code">INFO</span>.
+ </p>
+ <p>
+ A logging request is said to be <i>enabled</i> if its level is higher than or
+ equal to the level of its logger. Otherwise, the request is said to be <i>disabled</i>.
+ A logger without an assigned level will inherit one from the hierarchy. This
+ rule is summarized below.
+ </p>
+ <dl class="rule">
+ <dt>Basic Selection Rule</dt>
+ <dd>
+ <p>
+ A log request of level <i>L</i> in a logger with (either assigned or inherited,
+ whichever is appropriate) level <i>K</i>, is enabled if <i>L >= K</i>.
+ </p>
+ </dd>
+ </dl>
+ <p>
+ This rule is at the heart of log4net. It assumes that levels are ordered. For
+ the standard levels, we have
+ <span class="code">DEBUG < INFO < WARN < ERROR < FATAL</span>.
+ </p>
+ <p>
+ Calling the
+ <span class="code">log4net.LogManager.GetLogger</span>
+ method with the same name will always return a reference to the exact same
+ logger object.
+ </p>
+ <p>
+ For example, in:
+ </p>
+ <source language="C#"><![CDATA[
+ILog x = LogManager.GetLogger("wombat");
+ILog y = LogManager.GetLogger("wombat");]]></source>
+ <p>
+ <span class="code">x</span>
+ and
+ <span class="code">y</span>
+ refer to <i>exactly</i> the same logger object.
+ </p>
+ <p>
+ Thus, it is possible to configure a logger and then to retrieve the same
+ instance somewhere else in the code without passing around references. In
+ fundamental contradiction to biological parenthood, where parents always
+ precede their children, log4net loggers can be created and configured in any
+ order. In particular, a "parent" logger will find and link to its descendants
+ even if it is instantiated after them.
+ </p>
+ <p>
+ Configuration of the log4net environment is typically done at application
+ initialization. The preferred way is by reading a configuration file. This
+ approach will be discussed shortly.
+ </p>
+ <p>
+ Log4net makes it easy to name loggers by <i>software component</i>. This can be
+ accomplished by statically instantiating a logger in each class, with the
+ logger name equal to the fully qualified name of the class. This is a useful
+ and straightforward method of defining loggers. As the log output bears the
+ name of the generating logger, this naming strategy makes it easy to identify
+ the origin of a log message. However, this is only one possible, albeit common,
+ strategy for naming loggers. Log4net does not restrict the possible set of
+ loggers. The developer is free to name the loggers as desired.
+ </p>
+ <p>
+ Nevertheless, naming loggers after the class where they are located seems to be
+ the best strategy known so far. It is simple an obvious to the developers where
+ each log message came from. Most importantly it leverages the design of the
+ application to produce the design of the logger hierarchy. Hopefully some
+ thought has gone into the design of the application.
+ </p>
+ </section>
+
+ <section id="appenders" name="Appenders">
+ <p>
+ The ability to selectively enable or disable logging requests based on their
+ logger is only part of the picture. Log4net allows logging requests to print to
+ multiple destinations. In log4net speak, an output destination is called an <i>appender</i>.
+ Appenders must implement the <span class="code">log4net.Appenders.IAppender</span>
+ interface.
+ </p>
+ <p>
+ The following appenders are defined in the log4net package:
+ </p>
+ <div class="table">
+ <table>
+ <tr>
+ <th>
+ Type</th>
+ <th>
+ Description</th>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_AdoNetAppender.htm">log4net.Appender.AdoNetAppender</a></td>
+ <td>
+ Writes logging events to a database using either prepared statements or stored
+ procedures.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_AnsiColorTerminalAppender.htm">log4net.Appender.AnsiColorTerminalAppender</a></td>
+ <td>
+ Writes color highlighted logging events to a an ANSI terminal window.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_AspNetTraceAppender.htm">log4net.Appender.AspNetTraceAppender</a></td>
+ <td>
+ Writes logging events to the ASP trace context. These can then be rendered at
+ the end of the ASP page or on the ASP trace page.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_BufferingForwardingAppender.htm">log4net.Appender.BufferingForwardingAppender</a></td>
+ <td>
+ Buffers logging events before forwarding them to child appenders.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_ColoredConsoleAppender.htm">log4net.Appender.ColoredConsoleAppender</a></td>
+ <td>
+ Writes logging events to the application's Console. The events may go to either
+ the standard our stream or the standard error stream. The events may have configurable
+ text and background colors defined for each level.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_ConsoleAppender.htm">log4net.Appender.ConsoleAppender</a></td>
+ <td>
+ Writes logging events to the application's Console. The events may go to either
+ the standard our stream or the standard error stream.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_DebugAppender.htm">log4net.Appender.DebugAppender</a></td>
+ <td>
+ Writes logging events to the .NET system.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_EventLogAppender.htm">log4net.Appender.EventLogAppender</a></td>
+ <td>
+ Writes logging events to the Windows Event Log.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_FileAppender.htm">log4net.Appender.FileAppender</a></td>
+ <td>
+ Writes logging events to a file in the file system.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_ForwardingAppender.htm">log4net.Appender.ForwardingAppender</a></td>
+ <td>
+ Forwards logging events to child appenders.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_LocalSyslogAppender.htm">log4net.Appender.LocalSyslogAppender</a></td>
+ <td>
+ Writes logging events to the local syslog service (UNIX only).
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_MemoryAppender.htm">log4net.Appender.MemoryAppender</a></td>
+ <td>
+ Stores logging events in an in memory buffer.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_NetSendAppender.htm">log4net.Appender.NetSendAppender</a></td>
+ <td>
+ Writes logging events to the Windows Messenger service. These messages are
+ displayed in a dialog on a users terminal.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_OutputDebugStringAppender.htm">log4net.Appender.OutputDebugStringAppender</a></td>
+ <td>
+ Writes logging events to the debugger. If the application has no
+ debugger, the system debugger displays the string. If the application has no
+ debugger and the system debugger is not active, the message is ignored.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_RemoteSyslogAppender.htm">log4net.Appender.RemoteSyslogAppender</a></td>
+ <td>
+ Writes logging events to a remote syslog service using UDP networking.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_RemotingAppender.htm">log4net.Appender.RemotingAppender</a></td>
+ <td>
+ Writes logging events to a remoting sink using .NET remoting.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_RollingFileAppender.htm">log4net.Appender.RollingFileAppender</a></td>
+ <td>
+ Writes logging events to a file in the file system. The RollingFileAppender can
+ be configured to log to multiple files based upon date or file size
+ constraints.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_SmtpAppender.htm">log4net.Appender.SmtpAppender</a></td>
+ <td>
+ Sends logging events to an email address.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_SmtpPickupDirAppender.htm">log4net.Appender.SmtpPickupDirAppender</a></td>
+ <td>
+ Writes SMTP messages as files into a pickup directory.
+ These files can then be read and sent by an SMTP agent
+ such as the IIS SMTP agent.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_TelnetAppender.htm">log4net.Appender.TelnetAppender</a></td>
+ <td>
+ Clients connect via Telnet to receive logging events.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_TraceAppender.htm">log4net.Appender.TraceAppender</a></td>
+ <td>
+ Writes logging events to the .NET trace system.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Appender_UdpAppender.htm">log4net.Appender.UdpAppender</a></td>
+ <td>
+ Sends logging events as connectionless UDP datagrams to a remote host or a
+ multicast group using a UdpClient.
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ More than one appender can be attached to a logger.
+ </p>
+ <p>
+ <strong>
+ Each enabled logging request for a given logger will be forwarded to all
+ the appenders in that logger as well as the appenders higher in the hierarchy.
+ </strong>
+ In other words, appenders are inherited additively from the logger hierarchy.
+ For example, if a console appender is added to the <i>root</i> logger, then all
+ enabled logging requests will at least print on the console. If in addition a
+ file appender is added to a logger, say <i>X</i>, then enabled logging requests
+ for <i>X</i> and <i>X</i>'s children will print on a file <i>and</i> on the
+ console. It is possible to override this default behavior so that appender
+ accumulation is no longer additive by setting the additivity flag on the logger
+ to
+ <span class="code">false</span>.
+ </p>
+ <p>
+ The rules governing appender additivity are summarized below.
+ </p>
+ <dl class="rule">
+ <dt>Appender Additivity</dt>
+ <dd>
+ <p>
+ The output of a log statement of logger <i>X</i> will go to all the appenders
+ in <i>X</i> and its ancestors. This is the meaning of the term "appender
+ additivity".
+ </p>
+ <p>
+ However, if an ancestor of logger <i>X</i>, say <i>Y</i>, has the additivity
+ flag set to
+ <span class="code">false</span>, then <i>X</i>'s output will be directed to all
+ the appenders in <i>X</i> and it's ancestors up to and including <i>Y</i> but
+ not the appenders in any of the ancestors of <i>Y</i>.
+ </p>
+ <p>
+ Loggers have their additivity flag set to
+ <span class="code">true</span>
+ by default.
+ </p>
+ </dd>
+ </dl>
+ <p>
+ The table below shows an example:
+ </p>
+ <div class="table">
+ <table>
+ <tr>
+ <th>
+ Logger Name</th>
+ <th>
+ Added Appenders</th>
+ <th>
+ Additivity Flag</th>
+ <th>
+ Output Targets</th>
+ <th>
+ Comment</th>
+ </tr>
+ <tr>
+ <td><i>root</i></td>
+ <td>A1</td>
+ <td>not applicable</td>
+ <td>A1</td>
+ <td>There is no default appender attached to <i>root</i>.</td>
+ </tr>
+ <tr>
+ <td>x</td>
+ <td>A-x1, A-x2</td>
+ <td>true</td>
+ <td>A1, A-x1, A-x2</td>
+ <td>Appenders of "x" and <i>root</i>.</td>
+ </tr>
+ <tr>
+ <td>x.y</td>
+ <td>none</td>
+ <td>true</td>
+ <td>A1, A-x1, A-x2</td>
+ <td>Appenders of "x" and <i>root</i>.</td>
+ </tr>
+ <tr>
+ <td>x.y.z</td>
+ <td>A-xyz1</td>
+ <td>true</td>
+ <td>A1, A-x1, A-x2, A-xyz1</td>
+ <td>Appenders in "x.y.z", "x" and <i>root</i>.</td>
+ </tr>
+ <tr>
+ <td>security</td>
+ <td>A-sec</td>
+ <td><span class="code">false</span></td>
+ <td>A-sec</td>
+ <td>No appender accumulation since the additivity flag is set to
+ <span class="code">false</span>.</td>
+ </tr>
+ <tr>
+ <td>security.access</td>
+ <td>none</td>
+ <td>true</td>
+ <td>A-sec</td>
+ <td>Only appenders of "security" because the additivity flag in "security" is set
+ to
+ <span class="code">false</span>.</td>
+ </tr>
+ </table>
+ </div>
+ </section>
+
+ <section id="filters" name="Filters">
+ <p>
+ Appenders can filter the events that are delivered to them. The filters can be
+ specified in the configuration to allow fine control of the events that are
+ logged through different appenders.
+ </p>
+ <p>
+ The simplest form of control is to specify a
+ <span class="code">Threshold</span>
+ on the appender. This works by logging only the events that have a level that
+ is greater than or equal to the threshold.
+ </p>
+ <p>
+ More complex and custom event filtering can be done using the filter chain
+ defined on each appender. Filters must implement the
+ <span class="code">log4net.Filter.IFilter</span> interface.
+ </p>
+ <p>
+ The following filters are defined in the log4net package:
+ </p>
+ <div class="table">
+ <table>
+ <tr>
+ <th>
+ Type</th>
+ <th>
+ Description</th>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Filter_DenyAllFilter.htm">log4net.Filter.DenyAllFilter</a></td>
+ <td>
+ Drops all logging events.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Filter_LevelMatchFilter.htm">log4net.Filter.LevelMatchFilter</a></td>
+ <td>
+ An exact match to the event's level.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Filter_LevelRangeFilter.htm">log4net.Filter.LevelRangeFilter</a></td>
+ <td>
+ Matches against a range of levels.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Filter_LoggerMatchFilter.htm">log4net.Filter.LoggerMatchFilter</a></td>
+ <td>
+ Matches against a the start of the logger name.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Filter_PropertyFilter.htm">log4net.Filter.PropertyFilter</a></td>
+ <td>
+ Matches a substring from a specific property value.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Filter_StringMatchFilter.htm">log4net.Filter.StringMatchFilter</a></td>
+ <td>
+ Matches a substring from the event's message.
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p>
+ The filters can be configured to either accept or reject the event based upon
+ the match.
+ </p>
+ </section>
+
+ <section id="layouts" name="Layouts">
+ <p>
+ More often than not, users wish to customize not only the output destination
+ but also the output format. This is accomplished by associating a <i>layout</i>
+ with an appender. The layout is responsible for formatting the logging request
+ according to the user's wishes, whereas an appender takes care of sending the
+ formatted output to its destination. The
+ <span class="code">PatternLayout</span>, part of the standard log4net
+ distribution, lets the user specify the output format according to conversion
+ patterns similar to the C language
+ <span class="code">printf</span>
+ function.
+ </p>
+ <p>
+ For example, the PatternLayout with the conversion pattern
+ <span class="code">"%timestamp [%thread] %-5level %logger - %message%newline"</span>
+ will output something akin to:
+ </p>
+ <source language="text"><![CDATA[
+176 [main] INFO Com.Foo.Bar - Located nearest gas station.]]></source>
+ <p>
+ The first field is the number of milliseconds elapsed since the start of the
+ program. The second field is the thread making the log request. The third field
+ is the level of the log statement. The fourth field is the name of the logger
+ associated with the log request. The text after the '-' is the message of the
+ statement.
+ </p>
+ <p>
+ The following layouts are included in the log4net package:
+ </p>
+ <div class="table">
+ <table>
+ <tr>
+ <th>
+ Type</th>
+ <th>
+ Description</th>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Layout_ExceptionLayout.htm">log4net.Layout.ExceptionLayout</a></td>
+ <td>
+ Renders the exception text from the logging
+ event.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Layout_PatternLayout.htm">log4net.Layout.PatternLayout</a></td>
+ <td>
+ Formats the logging event according to a flexible
+ set of formatting flags.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Layout_RawTimeStampLayout.htm">log4net.Layout.RawTimeStampLayout</a></td>
+ <td>
+ Extracts the timestamp from the logging event.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Layout_RawUtcTimeStampLayout.htm">log4net.Layout.RawUtcTimeStampLayout</a></td>
+ <td>
+ Extracts the timestamp from the logging event in Universal Time.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Layout_SimpleLayout.htm">log4net.Layout.SimpleLayout</a></td>
+ <td>
+ Formats the logging event very simply:
+ <span class="code">[level] - [message]</span>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Layout_XmlLayout.htm">log4net.Layout.XmlLayout</a></td>
+ <td>
+ Formats the logging event as an XML element.
+ </td>
+ </tr>
+ <tr>
+ <td><a href="../sdk/html/T_log4net_Layout_XmlLayoutSchemaLog4j.htm">log4net.Layout.XmlLayoutSchemaLog4j</a></td>
+ <td>
+ Formats the logging event as an XML element that
+ complies with the log4j event dtd.
+ </td>
+ </tr>
+ </table>
+ </div>
+ </section>
+
+ <section id="renderers" name="Object Renderers">
+ <p>
+ Just as importantly, log4net will render the content of the log message
+ according to user specified criteria. For example, if you frequently need to
+ log
+ <span class="code">Oranges</span>, an object type used in your current project,
+ then you can register an
+ <span class="code">OrangeRenderer</span>
+ that will be invoked whenever an orange needs to be logged.
+ </p>
+ <p>
+ Object rendering follows the class hierarchy. For example, assuming oranges are
+ fruits, if you register an
+ <span class="code">FruitRenderer</span>, all fruits including oranges will be
+ rendered by the
+ <span class="code">FruitRenderer</span>, unless of course you registered an
+ orange specific
+ <span class="code">OrangeRenderer</span>.
+ </p>
+ <p>
+ Object renderers have to implement the
+ <span class="code">log4net.ObjectRenderer.IObjectRenderer</span>
+ interface.
+ </p>
+ <p>
+ Please note that ObjectRenderers are not used by the <span class="code">DebugFormat</span>,
+ <span class="code">InfoFormat</span>, <span class="code">WarnFormat</span>,
+ <span class="code">ErrorFormat</span> and <span class="code">FatalFormat</span> methods.
+ </p>
+ </section>
+
+ </section>
+
+ </section>
+ </body>
+</document>
diff --git a/src/site/xdoc/release/manual/plugins.xml b/src/site/xdoc/release/manual/plugins.xml
new file mode 100644
index 0000000..7d395b9
--- /dev/null
+++ b/src/site/xdoc/release/manual/plugins.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" ?>
+<!--
+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.
+-->
+<document>
+
+ <properties>
+ <author email="nicko at apache dot org">Nicko Cadell</author>
+ <title>Apache log4net Manual: Plugins</title>
+ </properties>
+
+ <meta name="keywords" content="log4net plugins, log4net" />
+
+ <body>
+ <section id="main" name="Apache log4net™ Manual - Plugins">
+ <section id="plugins" name="Plugins">
+ <p>
+ Plugins are additional modular components that are attached to a logger repository.
+ </p>
+ <p>
+ Plugins are stored in the <span class="code">PluginMap</span> of an
+ <span class="code">ILoggerRepository</span>.
+ Plugins are attached to the repository by using the <span class="code">PluginMap.Add</span>
+ method.
+ </p>
+ <p>
+ The following plugins are included in the log4net package:
+ </p>
+ <div class="table">
+ <table cellspacing="0">
+ <tr>
+ <th>
+ Type</th>
+ <th>
+ Description</th>
+ </tr>
+ <tr>
+ <td>log4net.Plugin.RemoteLoggingServerPlugin</td>
+ <td>
+ Creates a remote logging sink that can receive logging events from a
+ <span class="code">RemotingAppender</span>.
+ </td>
+ </tr>
+ </table>
+ </div>
+ <ul>
+ <li>
+ <h3>RemoteLoggingServerPlugin</h3>
+ <p>
+ Creates a remote logging sink that can receive logging events from a
+ <span class="code">RemotingAppender</span>.
+ </p>
+ <p>
+ Creates a remoting logging sink. A single
+ parameter must be passed to the constructor that specifies the sink URI. This is a
+ name used to identify the logging sink object published via remoting and must be
+ agreed with the client before communication can take place.
+ </p>
+ <p>
+ Example usage:
+ </p>
+ <source language="C#"><![CDATA[
+LogManager.GetRepository().PluginMap.Add(new RemoteLoggingServerPlugin("LoggingSink"));]]></source>
+ </li>
+ </ul>
+
+ <section id="attributes" name="Plugin Attributes">
+ <p>
+ Plugins can be configured using the following assembly-level attributes:
+ </p>
+ <ul>
+ <li>
+ <h3>PluginAttribute</h3>
+ <p>
+ Specifies a plugin type to create and attach to the default repository. This attribute
+ does not allow plugins to be parameterized. The plugin class must have a public default constructor.
+ </p>
+ <p>
+ This attribute may be used as many times as necessary to attach plugins to the repository.
+ </p>
+ </li>
+ </ul>
+ </section>
+ </section>
+
+ </section>
+ </body>
+</document>
diff --git a/src/site/xdoc/release/manual/repositories.xml b/src/site/xdoc/release/manual/repositories.xml
new file mode 100644
index 0000000..9bd7840
--- /dev/null
+++ b/src/site/xdoc/release/manual/repositories.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" ?>
+<!--
+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.
+-->
+<document>
+
+ <properties>
+ <author email="nicko at apache dot org">Nicko Cadell</author>
+ <title>Apache log4net Manual: Repositories</title>
+ </properties>
+
+ <meta name="keywords" content="building log4net, log4net" />
+
+ <body>
+ <section id="main" name="Apache log4net™ Manual - Repositories">
+ <section id="repository" name="Logging Repositories">
+ <p>
+ Logging repositories are considered advanced functionality. The default behavior
+ should be sufficient for most users.
+ </p>
+ <p>
+ Log4net supports logging repositories. A repository is uniquely named.
+ Each repository is a (<span class="code">ILoggerRepository</span>).
+ Multiple assemblies can link to the same repository.
+ </p>
+ <p>
+ By default there is a single logging repository per process (more precisely per AppDomain). This extends
+ across all assemblies loaded into the process and allows them to all share a
+ single configuration. The configuration of the repository only needs to be done once,
+ typically in the entry point to the application, either programmatically or using
+ a configuration attribute.
+ </p>
+ <p>
+ Named logging repositories can be created using the <span class="code">LogManager.CreateRepository</span>
+ method. The repository for can be retrieved using the
+ <span class="code">LogManager.GetRepository</span> method.
+ A repository created in this way will need to be configured programmatically.
+ </p>
+
+ <section id="attributes" name="Attributes">
+ <p>
+ An assembly may choose to utilize a named logging repository rather than the default repository.
+ This completely separates the logging for the assembly from the rest of the application.
+ This can be very useful to component developers that wish to use log4net for their
+ components but do not want to require that all the applications that use their
+ component are aware of log4net. It also means that their debugging configuration is
+ separated from the applications configuration. The assembly should specify the
+ <span class="code">RepositoryAttribute</span> to set its logging repository.
+ </p>
+ <p>
+ The log4net logging repositories can be configured using the following assembly-level
+ attributes:
+ </p>
+ <ul>
+ <li>
+ <b>AliasRepositoryAttribute</b>
+ <p>
+ Specifies a named repository to use as this assembly's repository.
+ </p>
+ <p>
+ An assembly's logger repository is defined by its
+ <span class="code">RepositoryAttribute</span>, however this can be overridden by an
+ assembly loaded before the target assembly.
+ </p>
+ <p>
+ An assembly can alias another assembly's repository by specifying
+ this attribute with the name of the target repository.
+ </p>
+ <p>
+ This attribute may be used as many times as necessary to alias all the required
+ repositories.
+ </p>
+ </li>
+ <li>
+ <b>RepositoryAttribute</b>
+ <p>
+ Specifies the logging repository for the assembly.
+ </p>
+ <p>
+ Assemblies are mapped to logging repositories. This attribute controls the configuration of the repository. The
+ <span class="code">Name</span> property specifies the name of the repository
+ for this assembly. The <span class="code">RepositoryType</span>
+ property specifies the type of the repository object to create for the assembly.
+ If this attribute is not specified and a <span class="code">Name</span>
+ is not specified then the assembly will be part of the default shared logging
+ repository.
+ </p>
+ <p>
+ This attribute may only be used once per assembly.
+ </p>
+ </li>
+ </ul>
+ </section>
+ </section>
+ </section>
+ </body>
+</document>
diff --git a/src/site/xdoc/release/release-notes.xml b/src/site/xdoc/release/release-notes.xml
new file mode 100644
index 0000000..3384ad7
--- /dev/null
+++ b/src/site/xdoc/release/release-notes.xml
@@ -0,0 +1,1342 @@
+<?xml version="1.0" ?>
+<!--
+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.
+-->
+<document>
+
+ <properties>
+ <author email="nicko at apache dot org">Nicko Cadell</author>
+ <title>Apache log4net: Release Notes</title>
+ </properties>
+
+ <meta name="keywords" content="log4net release notes, log4net" />
+
+ <body>
+
+ <section id="main" name="Apache log4net™ Release Notes">
+
+ <section id="2.0.8" name="2.0.8">
+ <p>
+ Apache log4net 2.0.8 fixes a
+ <code>LockRecursionException</code> that could happen
+ inside the <code>FileAppender</code> under certain
+ circumstances. It also adds support for
+ <code>LogicalThreadContext</code> to the .NET Standard
+ build based on <code>AsyncLocal</code> rather than
+ <code>CallContext</code>.
+ </p>
+
+ <section id="2.0.8-bug" name="Bug Fixes">
+ <ul>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-466'>LOG4NET-466</a>] - "LockRecursionException: A read lock may not be acquired with the write lock held in this mode." exception
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-550'>LOG4NET-550</a>] - Logging recursively from an Appender not supported for NET_4_0 and MONO_4_0
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-551'>LOG4NET-551</a>] - LockRecursionException when using File Appenders
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-554'>LOG4NET-554</a>] - LogicalThreadContext was removed in .NETStandard
+ </li>
+ </ul>
+ </section>
+
+ <section id="2.0.8-new" name="New Features">
+ <ul>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-553'>LOG4NET-553</a>] - DebugAppender configuration should give the possibility to disable outputting loggerName as category
+ </li>
+ </ul>
+ </section>
+ </section>
+
+ <section id="2.0.7" name="2.0.7">
+ <p>
+ Apache log4net 2.0.7 fixes a glitch in nuget packaging and
+ is otherwise identical to 2.0.6 (apart from the copyright
+ year and assembly version). If you are not using the nuget
+ package there is no reason to upgrade.
+ </p>
+
+ <section id="2.0.7-bug" name="Bug Fixes">
+ <ul>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-540'>LOG4NET-540</a>] - nuget dependencies for .NET Standard leak into net46
+ </li>
+ </ul>
+ </section>
+ </section>
+
+ <section id="2.0.6" name="2.0.6">
+
+ <p>
+ The Apache log4net team is now responsible for the nuget
+ package, we've changed the version number of this release
+ to align the version numbers. Release 2.0.6 is supposed to
+ be compatible with 1.2.15.
+ </p>
+
+ <p>
+ The binary distributions no longer contain assemblies
+ built for the .NET Framework 1.x or Mono 1.x - you can
+ build those yourself using the source distribution.
+ </p>
+
+ <p>
+ Starting with 2.0.6 .NET Core - or more precisely
+ .NET Standard 1.3 - has become a supported platform. Please
+ note that several features of log4net are not available
+ when using the .NET Core version, see <a
+ href="framework-support.html#netstandard-1.3">framework
+ support</a> for details.
+ </p>
+
+ <section id="2.0.6-bug" name="Bug Fixes">
+ <ul>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-508'>LOG4NET-508</a>] - NAnt release build is not optimized
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-512'>LOG4NET-512</a>] - Thread safety issue in Hierarchy.cs
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-527'>LOG4NET-527</a>] - broken link on config-examples.html
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-529'>LOG4NET-529</a>] - Possible thread-safety bug in LoggingEvent
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-536'>LOG4NET-536</a>] - Can't build for NETCF-2.0
+ </li>
+ </ul>
+ </section>
+ <section id="2.0.6-enh" name="Improvements">
+ <ul>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-530'>LOG4NET-530</a>] - Use UTC internally to avoid ambiguous timestamps
+ </li>
+ </ul>
+ </section>
+
+ <section id="2.0.6-new" name="New Features">
+ <ul>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-467'>LOG4NET-467</a>] - Is .NET Core, will be supported in the near future, or not
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-511'>LOG4NET-511</a>] - API to flush appenders
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-526'>LOG4NET-526</a>] - Add appSetting conversion pattern to PatternString
+ </li>
+ </ul>
+ </section>
+ </section>
+
+ <section id="1.2.15" name="1.2.15">
+ <section id="1.2.15-bug" name="Bug Fixes">
+ <ul>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-462'>LOG4NET-462</a>] - ReadOnlyPropertiesDictionary not thread safe
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-488'>LOG4NET-488</a>] - Fix tests build
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-489'>LOG4NET-489</a>] - AdoNetAppender fails after upgrade to 2.0.4
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-490'>LOG4NET-490</a>] - InterProcessLock Tests fail
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-493'>LOG4NET-493</a>] - Log4net 1.2.14/ADO.NET appender throws exception when starting (1.2.13 with same config works fine)
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-494'>LOG4NET-494</a>] - ArgumentOutOfRange with SQLite
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-495'>LOG4NET-495</a>] - Error when BufferSize is >1, parameter already defined
+ </li>
+ </ul>
+ </section>
+ </section>
+
+ <section id="1.2.14" name="1.2.14">
+ <section id="1.2.14-bug" name="Bug Fixes">
+ <ul>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-408'>LOG4NET-408</a>] - Correction on InterProcessLock
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-443'>LOG4NET-443</a>] - Logger.CallAppenders
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-447'>LOG4NET-447</a>] - MemoryAppender class is not thread safe
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-455'>LOG4NET-455</a>] - LogicalThreadContext does not flow correctly through async/await
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-479'>LOG4NET-479</a>] - Cannot compile log4net.vs2008
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-484'>LOG4NET-484</a>] - System.ObjectDisposedException with FileAppender+InterProcessLock
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-485'>LOG4NET-485</a>] - RollingFileAppender cannot be used by multiple process
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-486'>LOG4NET-486</a>] - Rolling File Appender with 'maxSizeRollBackups' and 'datePattern' does not detect existing logs initially
+ </li>
+ </ul>
+ </section>
+
+ <section id="1.2.14-enh" name="Improvements">
+ <ul>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-456'>LOG4NET-456</a>] - Include debug symbol files in release packages
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-457'>LOG4NET-457</a>] - SMTP Appender should trim leading and trailing separators from address fields
+ </li>
+ </ul>
+ </section>
+
+ <section id="1.2.14-new" name="New Features">
+ <ul>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-473'>LOG4NET-473</a>] - Option for file extension in SmtpPickupDirAppender
+ </li>
+ </ul>
+ </section>
+ </section>
+
+ <section id="1.2.13" name="1.2.13">
+
+ <section id="1.2.13-bug" name="Bug Fixes">
+ <ul>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-132'>LOG4NET-132</a>] - Environment variables are mistakenly case sensitive on windows
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-376'>LOG4NET-376</a>] - Race condition in AbsoluteTimeDateFormatter
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-393'>LOG4NET-393</a>] - Using dynamic methods with log4net causes NullReferenceException in StackFrameItem
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-399'>LOG4NET-399</a>] - Does not build for Compact Framework 2.0
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-404'>LOG4NET-404</a>] - assemblies for .NET 3.5 are missing ILogExtensions
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-405'>LOG4NET-405</a>] - SmtpAppender encoding changes
+ </li>
+ </ul>
+
+ </section>
+
+ <section id="1.2.13-enh" name="Improvements">
+
+ <ul>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-394'>LOG4NET-394</a>] - Lambda-based ILog-Extensions should catch errors
+ </li>
+ </ul>
+
+ </section>
+ </section>
+
+ <section id="1.2.12" name="1.2.12">
+
+ <p>
+ The binary distributions no longer contain assemblies
+ built for the Compact Framework 2.0 - you can build
+ those yourself using the source distribution.
+ </p>
+
+ <section id="1.2.12-bug" name="Bug Fixes">
+ <ul>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-148'>LOG4NET-148</a>] - ThreadContext uses LocalDataStore to store ThreadSpecific data instead should be using [ThreadStatic] variables.
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-178'>LOG4NET-178</a>] - Log4Net stops logging after appdomain recycle of ASP.NET2.0 application
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-202'>LOG4NET-202</a>] - AdoNetAppenderParameter.Size Property is not optional
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-218'>LOG4NET-218</a>] - Test StringFormatTest.TestFormatString fails
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-220'>LOG4NET-220</a>] - multiple users overwrite existing log file when RollingFileAppender is rolling over date and minimal locking is used
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-228'>LOG4NET-228</a>] - log4net.Util.HostName may throw System.Configuration.ConfigurationErrorsException in System.Net.Dns.GetHostName(). The exception should be ignored.
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-266'>LOG4NET-266</a>] - AdoNetAppender does not work on a IIS 7 website using Windows authentication
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-277'>LOG4NET-277</a>] - Registering a custom Object Renderer in configuration file
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-284'>LOG4NET-284</a>] - In a multithreaded application, duplicate messages are output.
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-294'>LOG4NET-294</a>] - Exception rendering object type [System.OutOfMemoryException]
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-317'>LOG4NET-317</a>] - LogicalThreadContext sometimes doesn't follow CallContext's logical thread
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-322'>LOG4NET-322</a>] - Conditional compilation symbols for .net4 Release
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-323'>LOG4NET-323</a>] - AbsoluteTimeDateFormatter caches string representation of now too aggressively
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-331'>LOG4NET-331</a>] - AdoNetAppender errors when writing Asp.net item when Request object is null
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-335'>LOG4NET-335</a>] - Lost the ability to monitor changes to logger config files when you call ConfigureAndWatch multiple times with different Config File Names - worked fine on 1.2.10.0
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-341'>LOG4NET-341</a>] - RemotingAppender Error
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-343'>LOG4NET-343</a>] - ArgumentOutOfRangeException in log4net hierarchy on "." logger name
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-347'>LOG4NET-347</a>] - Log4net not working in an ASP.Net environment with medium trust
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-348'>LOG4NET-348</a>] - System.IndexOutOfRangeException when StackFrameLevel is greater then StackFrames length
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-352'>LOG4NET-352</a>] - CS0419 during build with Mono >2.6
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-360'>LOG4NET-360</a>] - EventLogAppender can corrupt the event log on Windows Vista and higher if the string is longer than 31839 bytes
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-361'>LOG4NET-361</a>] - RollingLogFileAppender does not correctly initialize the backup index when style is date or composite
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-369'>LOG4NET-369</a>] - preserveLogFileNameExtension is not considered when rolling over time after an application restart
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-370'>LOG4NET-370</a>] - RemoteSyslogAppender doesn't properly handle newline in log message
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-371'>LOG4NET-371</a>] - Log with formatting doesn't call custom renderers (IObjectRenderer)
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-375'>LOG4NET-375</a>] - typo / misspelling in log message
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-378'>LOG4NET-378</a>] - Rolling log file is overwritten when application is restarted
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-379'>LOG4NET-379</a>] - NullReferenceException in FileAppender when file is not filled.
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-382'>LOG4NET-382</a>] - TargetInvocationException occurs because MESSAGE_SIZE fields in EventLogAppender are initialized in wrong order
+ </li>
+ </ul>
+ </section>
+
+ <section id="1.2.12-enh" name="Improvements">
+ <ul>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-222'>LOG4NET-222</a>] - [PATCH] Improve AnsiColorTerminalAppender to support marking colors as Light
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-223'>LOG4NET-223</a>] - [PATCH] Improve AnsiColorTerminalAppender to support marking colors as Light
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-232'>LOG4NET-232</a>] - Use ReaderWriterLockSlim instead of ReaderWriterLock.
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-259'>LOG4NET-259</a>] - Log4Net does not create a new tab in Chainsaw
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-283'>LOG4NET-283</a>] - OnlyOnceErrorHandler is not subclass-friendly
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-292'>LOG4NET-292</a>] - Managed ColoredConsoleAppender for .NET2/Mono.
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-315'>LOG4NET-315</a>] - SmtpAppender - Add support for ignoring certificate errors
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-316'>LOG4NET-316</a>] - Provide a Layout Pattern that is re-evaluated on each use
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-318'>LOG4NET-318</a>] - log4net doesn't pass verification
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-334'>LOG4NET-334</a>] - Appender Faill over
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-354'>LOG4NET-354</a>] - E-mail encoding configuration setting for SmtpAppender
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-362'>LOG4NET-362</a>] - [PATCH] SystemInfo.AssemblyLocationInfo throws unhandled ArgumentException "Absolute path required" when exe is started via UNC path
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-386'>LOG4NET-386</a>] - Can't access ThreadContext properties
+ </li>
+ </ul>
+ </section>
+
+ <section id="1.2.12-new" name="New Features">
+ <ul>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-290'>LOG4NET-290</a>] - Add Lambda-based ILog-Extensions (embedded log.IsEnabled)
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-342'>LOG4NET-342</a>] - Add a way to prevent silent failure
+ </li>
+ </ul>
+ </section>
+ </section>
+
+ <section id="1.2.11" name="1.2.11">
+ <p>
+ log4net 1.2.11 is not only a bugfix release, it also
+ adds support for Microsoft® .NET 4.0 as well as the client profiles
+ of .NET 3.5 and .NET 4.0.
+ </p>
+
+ <p>
+ Starting with this release log4net uses a new strong
+ name key but we also provide a binary distribution using
+ the "old" strong name key of log4net 1.2.10 and earlier.
+ See <a href="faq.html#two-snks">the FAQ</a> for details.
+ </p>
+
+ <p>
+ The binary distributions no longer contain assemblies
+ built for the Compact Framework 1.0 or the Shared Source
+ CLI - you can build those yourself using the source
+ distribution.
+ </p>
+
+ <section id="1.2.11-breaking" name="Breaking Changes">
+ <p>
+ The signature of
+ <code>ILoggerFactory.CreateLogger</code> has changed.
+ </p>
+ </section>
+
+ <section id="1.2.11-bug" name="Bug Fixes">
+ <ul>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-76'>LOG4NET-76</a>] - TextWriterAdapter is not thread safe
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-79'>LOG4NET-79</a>] - SecurityException thrown in LogicalThreadContextProperties GetProperties
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-81'>LOG4NET-81</a>] - LoggerRepositorySkeleton's OnConfigurationChanged method always raises its event with EventArgs.Empty instead of passing through its EventArgs parameter.
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-93'>LOG4NET-93</a>] - Typos for node name in tutorial, excess quote, invalid XML
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-94'>LOG4NET-94</a>] - Incorrect config file for ..\examples\net\1.0\Tutorials\ConsoleApp
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-95'>LOG4NET-95</a>] - Level.CompareTo() may result a wrong Value -> sorting of Levels does not work
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-113'>LOG4NET-113</a>] - SystemInfo.GetTypeFromString() raises NotSupportedException
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-123'>LOG4NET-123</a>] - EnvironmentPatternConverter does not expand User or System level environment variables under Windows
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-126'>LOG4NET-126</a>] - Links on the log4net Examples page do not work, including the overview link explaining why the other links do not work
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-128'>LOG4NET-128</a>] - Either documentation is incorrect or a bug in SmtpAppender
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-129'>LOG4NET-129</a>] - EventLogAppender EventID parsing does not handle Active Properties properly
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-135'>LOG4NET-135</a>] - Bad example code in documentation
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-137'>LOG4NET-137</a>] - log4net.Filter.LevelMatchFilter does not work anymore
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-143'>LOG4NET-143</a>] - Invalid Repository Config Uri composition from "log4net.Config" application setting
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-146'>LOG4NET-146</a>] - System.NullReferenceException on FindAndRender object
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-158'>LOG4NET-158</a>] - XMLConfigurator.ConfigureAndWatch() leaks resources if called multiple times
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-167'>LOG4NET-167</a>] - ArrayOutOfBounds Exception in MemoryAppender.getEvents()
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-212'>LOG4NET-212</a>] - Threading bug in the PatternConverter.cs
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-214'>LOG4NET-214</a>] - EventLogAppender should also use config file to set EventId
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-215'>LOG4NET-215</a>] - Exception on Convert for return %class{1} name
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-229'>LOG4NET-229</a>] - Japanese characters get garbled with log4net.Layout.XmlLayoutSchemaLog4j
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-241'>LOG4NET-241</a>] - Issue tracking page does not link to project
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-242'>LOG4NET-242</a>] - Download page does not have link to KEYS file
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-243'>LOG4NET-243</a>] - broken link on http://logging.apache.org/log4net/release/example-apps.html
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-244'>LOG4NET-244</a>] - SmtpAppender.To Property has incorrect delimiter
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-257'>LOG4NET-257</a>] - Visual Studio 2010 .NET 4.0 Application does not copy log4net lib to bin directory
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-265'>LOG4NET-265</a>] - RemoteFileAppender Tests fail on Windows 7
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-274'>LOG4NET-274</a>] - log4net doesn't log when running a .Net 4.0 Windows application built in Release mode
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-297'>LOG4NET-297</a>] - AppenderSkeleton.RequiresLayout docs and implementation don't match
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-300'>LOG4NET-300</a>] - FilterTest doesn't compile for .Net 2.0
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-301'>LOG4NET-301</a>] - Unit tests fail on a clean checkout on .NET 2.0 using NAnt
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-310'>LOG4NET-310</a>] - EventLogAppender's ActivateOptions throws SecurityException on Vista/Win2k3 and later when not run as administrator
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-311'>LOG4NET-311</a>] - MinimalLock and AppendToFile=false don't work together in trunk's FileAppender
+ </li>
+ </ul>
+ </section>
+
+ <section id="1.2.11-enh" name="Improvements">
+ <ul>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-31'>LOG4NET-31</a>] - Allow user to pass in additional parameters to <converter> node via some kind of <property> tag
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-38'>LOG4NET-38</a>] - EventLogAppender: Add support for setting the Category on Event Log messages.
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-66'>LOG4NET-66</a>] - PreserveFileExtension with StaticFileName
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-77'>LOG4NET-77</a>] - A small improvement of log4net.Layout.Pattern.ExceptionPatternConverter - added 'Option' propery support
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-88'>LOG4NET-88</a>] - support .NET 2.0 connectionStrings configuration section
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-96'>LOG4NET-96</a>] - Expose the Message, Exception, and ErrorCode properties of OnlyOnceErrorHandler.
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-97'>LOG4NET-97</a>] - Make Hierarchy's ILoggerFactory aware of the repository's LevelMap
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-98'>LOG4NET-98</a>] - Update header comment in files to be compliant with new Apache header requirements: http://www.apache.org/legal/src-headers.html for 11/1/2006 deadline
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-100'>LOG4NET-100</a>] - IPAddressConverter improvement for .NET 2 or .NET 3
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-106'>LOG4NET-106</a>] - TraceAppender : Add switch to disable using logger name as trace category
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-112'>LOG4NET-112</a>] - Add support to the UdpAppender for IP v6 remote addresses
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-131'>LOG4NET-131</a>] - Add Cc and Bcc support to SmtpAppender
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-141'>LOG4NET-141</a>] - Add CreateConnection method to AdoNetAppender to allow subclasses to have control of IDbConnection.
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-153'>LOG4NET-153</a>] - Make it easier to configure multiple appenders in code using BasicConfigurator
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-157'>LOG4NET-157</a>] - FAQ for getting the fully-qualified name of a class
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-164'>LOG4NET-164</a>] - using a named mutex for file appenders
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-170'>LOG4NET-170</a>] - Documentation improvement re: fixing and active properties
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-246'>LOG4NET-246</a>] - Make it possible to choose whether or not to watch configuration files specified using the "log4net.Config" appsetting key
+ </li>
+ </ul>
+
+ </section>
+ <section id="1.2.11-new" name="New Features">
+ <ul>
+ <li>The various static <code>Configure</code> methods of the <code>Configurator</code> classes now return collections of configuration messages rather than <code>void</code>.
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-59'>LOG4NET-59</a>] - add the ability to roll files based on universal time (UTC).
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-64'>LOG4NET-64</a>] - add the ability to preserve the log file name extension when rolling the log file.
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-87'>LOG4NET-87</a>] - Support ASP.Net related PatternConverters to allow items from the HttpContext.Current.Session, Cache, Request, etc. to be captured.
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-92'>LOG4NET-92</a>] - Build for Compact Framework 2.0
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-107'>LOG4NET-107</a>] - Added ExceptionEvaluator
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-115'>LOG4NET-115</a>] - Expand UserAppDataPath in filename
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-116'>LOG4NET-116</a>] - allow smtp to ssl authenticate and with certificates.
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-154'>LOG4NET-154</a>] - Add a StackTracePatternConverter to display method calls leading up to log message
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-155'>LOG4NET-155</a>] - Add TimeEvaluator
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-168'>LOG4NET-168</a>] - New property ReplyTo address for the SmtpAppender required
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-176'>LOG4NET-176</a>] - Buildable with VS 2008 and .NET FW 3.5
+ </li>
+ <li>[<a href='https://issues.apache.org/jira/browse/LOG4NET-233'>LOG4NET-233</a>] - Support .NET 4.0 including Client Profile
+ </li>
+ </li>
+ </ul>
+ </section>
+
+ </section>
+
+ <section id="1.2.10" name="1.2.10">
+
+ <section id="1.2.10-bug" name="Bug Fixes">
+ <ul>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-21'>LOG4NET-21</a>] - RemotingAppender fails once NDC becomes empty</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-22'>LOG4NET-22</a>] - XmlLayout allows output of invalid control characters</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-23'>LOG4NET-23</a>] - example-apps.html links are off by one folder level</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-25'>LOG4NET-25</a>] - RollingFileAppender can fail if RollOverIfDateBoundaryCrossing required</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-28'>LOG4NET-28</a>] - AdoNetAppender does not support inserting NULL into columns</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-29'>LOG4NET-29</a>] - LevelMatchFilter should return Neutral when no match is found</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-32'>LOG4NET-32</a>] - AdoNetAppender losing first entry</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-35'>LOG4NET-35</a>] - Exception rendering ThreadContextStack if null value pushed into stack</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-36'>LOG4NET-36</a>] - System.Diagnostics.Trace may throw exception if AppDomain does not have config file</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-40'>LOG4NET-40</a>] - RollingFileAppender does not limit files to MaxSizeRollBackups when CountDirection is 1</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-41'>LOG4NET-41</a>] - RollingFileAppender roll over date fail</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-42'>LOG4NET-42</a>] - Serialised LoggingEvent does not preserve the Fix flags</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-43'>LOG4NET-43</a>] - Specifying an empty string as a property in the config file results in an error</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-44'>LOG4NET-44</a>] - XmlLayout emits all properties under a node named global-properties, rather than just properties.</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-49'>LOG4NET-49</a>] - CountingQuietTextWriter does not count strings written with WriteLine</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-50'>LOG4NET-50</a>] - Process.StartTime hangs on some systems</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-60'>LOG4NET-60</a>] - Bug in RollingFileAppender.cs causing failure to timely roll files on monthly interval</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-63'>LOG4NET-63</a>] - 1.2.9.0 Documentation typos</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-65'>LOG4NET-65</a>] - Unhandled SecurityException exception for FileIOPermission while loading configuration file</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-67'>LOG4NET-67</a>] - CVE-2006-0743 Security vulnerability in LocalSyslogAppender</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-69'>LOG4NET-69</a>] - Exception thrown when *Format methods are given a malformed format string</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-70'>LOG4NET-70</a>] - CoreDll.dll referenced with different capitalisation</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-73'>LOG4NET-73</a>] - ADONetAppender.ActivateOptions() leaks database connection when called multiple times</li>
+ </ul>
+ </section>
+
+ <section id="1.2.10-new" name="New Features">
+ <ul>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-11'>LOG4NET-11</a>] - Add Flush command to API</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-24'>LOG4NET-24</a>] - Programmatic flush of BufferingAppenderSkeleton buffer</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-37'>LOG4NET-37</a>] - Allow the RepositorySelector type to be specified using the AppSettings config</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-46'>LOG4NET-46</a>] - Support appenders that can output multiple events efficiently</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-51'>LOG4NET-51</a>] - WmiAppender</li>
+ </ul>
+ </section>
+
+ <section id="1.2.10-enh" name="Improvements">
+ <ul>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-3'>LOG4NET-3</a>] - Support per event patterns in FileAppender File name</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-13'>LOG4NET-13</a>] - Allow SMTPAppender to have replaceable parameters in Subject</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-15'>LOG4NET-15</a>] - Email high "importance" priority setting with SmtpAppender</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-17'>LOG4NET-17</a>] - Line-wrapping Appender Layouts</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-33'>LOG4NET-33</a>] - Ability to use global property to point to log4net configuration file</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-34'>LOG4NET-34</a>] - Allow xml config values to be set via XmlNodeType.CDATA or XmlNodeType.Text rather than just value="foo"</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-45'>LOG4NET-45</a>] - PluginAttribute does not allow plugin type to be specified as a Type, only as a string</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-52'>LOG4NET-52</a>] - Allow XML configurator to set properties of type Object</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-53'>LOG4NET-53</a>] - Allow repository properties to be set in the config file</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-56'>LOG4NET-56</a>] - Support rendering IEnumerator objects as well as ICollections</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-58'>LOG4NET-58</a>] - Support clean build on .NET 2.0</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-72'>LOG4NET-72</a>] - Performance of ILog.xxxFormat methods</li>
+ <li>[<a href='http://issues.apache.org/jira/browse/LOG4NET-74'>LOG4NET-74</a>] - Change MemoryAppender member variables to protected</li>
+ </ul>
+ </section>
+
+ </section>
+
+ <section id="1.2.9" name="1.2.9 Beta">
+
+ <section id="1.2.9-breaking" name="Breaking Changes">
+ <h3>Renamed namespaces</h3>
+ <p>
+ Renamed namespace <span class="code">log4net.spi</span> to <span class="code">log4net.Core</span>.
+ Renamed namespace <span class="code">log4net.helpers</span> to <span class="code">log4net.Util</span>.
+ </p>
+ <h3>Renamed config classes and attributes</h3>
+ <p>
+ In the <span class="code">log4net.Config</span> namespace the <span class="code">DOMConfigurator</span>,
+ <span class="code">DOMConfiguratorAttribute</span>, <span class="code">DomainAttribute</span>,
+ and <span class="code">AliasDomainAttribute</span> have been marked as obsolete. These types are
+ still available and functional in this release.
+ </p>
+ <p>
+ The <span class="code">XmlConfigurator</span> and <span class="code">XmlConfiguratorAttribute</span>
+ types replace <span class="code">DOMConfigurator</span> and
+ <span class="code">DOMConfiguratorAttribute</span>. The <span class="code">RepositoryAttribute</span>
+ and <span class="code">AliasRepositoryAttribute</span> types replace
+ <span class="code">DomainAttribute</span> and <span class="code">AliasDomainAttribute</span>.
+ </p>
+ <h3>Fixed pascal casing of type names</h3>
+ <p>
+ Renamed <span class="code">AdoNetAppender</span>, <span class="code">AspNetTraceAppender</span>,
+ <span class="code">SmtpAppender</span>, <span class="code">Iso8601DateFormatter</span>,
+ <span class="code">MdcFilter</span>, and <span class="code">NdcFilter</span>.
+ Note that the config file type resolver is case insensitive so this is only a breaking change
+ for code that programmatically creates a type that has been renamed.
+ </p>
+ <h3>Layouts changed to stream their output to a <span class="code">TextWriter</span></h3>
+ <p>
+ Layouts have been changed to format their output to a <span class="code">TextWriter</span>
+ rather than return a string. This increases performance and reduces temporary object creation.
+ </p>
+ <h3>C style string escapes no longer supported by config parser</h3>
+ <p>
+ The XML config parser no longer supports decoding C style escape sequences in strings.
+ Previously sequences like <span class="code">\n</span> and <span class="code">\\</span>
+ where decoded. Instead use the appropriate XML encodings as required.
+ </p>
+ </section>
+
+ <section id="1.2.9-new" name="New Features">
+ <h3>New CLI build</h3>
+ <p>
+ A new log4net assembly is built that targets all CLI 1.0 compatible runtimes.
+ This build is essentially a common subset of the Mono 1.0 and .NET 1.0 builds.
+ It is built using the MS .NET 1.0 compiler and libraries but does not use any
+ platform specific APIs.
+ </p>
+ <p>
+ This build is only available in release configuration and can be found at
+ <span class="code">bin\cli\1.0\release</span>.
+ </p>
+ <h3>Logging contexts</h3>
+ <p>
+ Logging contexts can be used to record contextual data that is relevant to the current
+ process. Logging contexts are both an extension of the concepts embodied in the
+ <span class="code">MDC</span> and <span class="code">NDC</span> and a replacement for
+ them. The <span class="code">MDC</span> and <span class="code">NDC</span> have been
+ reimplemented to use the <span class="code">ThreadContext</span> as storage.
+ </p>
+ <p>
+ The logging contexts provide a single unified view that cuts across different
+ scopes within an application.
+ The contexts are layered in the following order of narrowing scope:
+ <span class="code">GlobalContext</span>, <span class="code">ThreadContext</span>,
+ <span class="code">LogicalThreadContext</span>, and <span class="code">LoggingEvent</span>.
+ Context values specified in a narrower scope hide the matching value in a wider scope.
+ </p>
+ <h3><span class="code">PatternLayout</span> customization and long pattern names</h3>
+ <p>
+ The <span class="code">PatternLayout</span> now supports long pattern names.
+ These pattern names are significantly more readable than the single character patterns.
+ </p>
+ <p>
+ The <span class="code">PatternLayout</span> now supports custom patterns. New patterns
+ can be defined in the config file:
+ </p>
+ <div class="syntax"><pre class="code">
+<layout type="log4net.Layout.PatternLayout">
+
+ <converter>
+ <name value="myConverter" />
+ <type value="TestApp.MyPatternConverter, TestApp" />
+ </converter>
+
+ <conversionPattern value="%-5level %logger - %myConverter - %message%newline" />
+</layout></pre></div>
+ <p>
+ The above config defines a custom pattern called <span class="code">myConverter</span>
+ which is bound to the <span class="code">TestApp.MyPatternConverter, TestApp</span>
+ type. This type must extend the <span class="code">log4net.Util.PatternConverter</span>
+ base class. The custom pattern can then be used in the pattern string.
+ </p>
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Layout_PatternLayout.htm">log4net.Layout.PatternLayout</a>.
+ </p>
+ <h3><span class="code">PatternString</span> for pattern based configuration</h3>
+ <p>
+ A new pattern based type, <span class="code">PatternString</span>, can be used in
+ the config file to set string properties using a pattern syntax. For example the
+ File property of the FileAppender could be set as follows:
+ </p>
+ <div class="syntax"><pre class="code">
+<file type="log4net.Util.PatternString">
+
+ <converter>
+ <name value="folder" />
+ <type value="TestApp.SpecialFolderPatternConverter,TestApp" />
+ </converter>
+
+ <conversionPattern value="%folder{LocalApplicationData}\log-file.txt" />
+</file></pre></div>
+ <p>
+ The code for the <span class="code">SpecialFolderPatternConverter</span>
+ is as follows:
+ </p>
+ <div class="syntax"><pre class="code">
+public class SpecialFolderPatternConverter : log4net.Util.PatternConverter
+{
+ override protected void Convert(System.IO.TextWriter writer, object state)
+ {
+ Environment.SpecialFolder specialFolder =
+ (Environment.SpecialFolder)Enum.Parse(typeof(Environment.SpecialFolder), base.Option, true);
+
+ writer.Write(Environment.GetFolderPath(specialFolder));
+ }
+}</pre></div>
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Util_PatternString_htm">log4net.Util.PatternString</a>.
+ </p>
+ <h3>Loading configuration from a URI</h3>
+ <p>
+ The <span class="code">XmlConfigurator</span> methods now support loading the
+ configuration data from a URI. Config can be loaded from any URI supported by the
+ <span class="code">System.Net.WebRequest</span> class.
+ </p>
+ <h3>Support for No-Touch deployment</h3>
+ <p>
+ Log4net supports configuring No-Touch deployment applications using the
+ <span class="code">XmlConfiguratorAttribute</span>. If a relative config file
+ or extension is specified then this is resolved relative to the deployment
+ URI.
+ </p>
+ <h3>Config file parser enhancements</h3>
+ <p>
+ The config file parser has been enhanced to support specifying the property subtype, or intermediate type,
+ directly on the property element, for example:
+ </p>
+ <div class="syntax"><pre class="code">
+<layout type="log4net.Layout.PatternLayout" value="%message%newline" /></pre></div>
+ <p>
+ Implicit conversion will be attempted between the value string and the type specified,
+ and then again between the type and the target property type.
+ </p>
+ <h3>.NET string formatting syntax</h3>
+ <p>
+ Added .NET <span class="code">String.Format</span> style formatting syntax methods to
+ the <span class="code">ILog</span> interface. The new methods are:
+ <span class="code">DebugFormat</span>, <span class="code">InfoFormat</span>,
+ <span class="code">WarnFormat</span>, <span class="code">ErrorFormat</span>
+ and <span class="code">FatalFormat</span>.
+ </p>
+ <h3>Customizable levels</h3>
+ <p>
+ Levels are defined by the repository <span class="code">LevelMap</span>. The defined
+ levels, the relative ordering of levels and level display names can be configured on
+ a per-repository basis.
+ </p>
+ <h3>Per-appender security contexts</h3>
+ <p>
+ Appenders that interact with controlled platform resources, e.g. files, can be
+ configured to use a separate security context when accessing these resources.
+ The calling thread may not have appropriate privileges to access the resource a
+ custom <span class="code">SecurityContext</span> can be used to elevate the
+ privileges of the appender. The <span class="code">WindowsSecurityContext</span>
+ is used to specify alternative credentials on the Windows platform.
+ </p>
+ <h3>Added new appenders</h3>
+ <dl>
+ <dt><span class="code">AnsiColorTerminalAppender</span></dt>
+ <dd>
+ <p>
+ The <span class="code">AnsiColorTerminalAppender</span> writes events to
+ the application's ANSI terminal window. It can be configured to specify
+ the text and background colors for different level events. Note that Console
+ applications running on Windows do not have an ANSI terminal window and
+ should use the <span class="code">ColoredConsoleAppender</span> instead.
+ </p>
+ </dd>
+ <dt><span class="code">LocalSyslogAppender</span></dt>
+ <dd>
+ <p>
+ Logs events to a local syslog service. This appender uses the POSIX libc syslog
+ library functions. If these functions are not available on the local system then
+ this appender will not work!
+ </p>
+ </dd>
+ <dt><span class="code">RemoteSyslogAppender</span></dt>
+ <dd>
+ <p>
+ The <span class="code">RemoteSyslogAppender</span> uses the BSD syslog protocol to
+ log to a syslog daemon. The syslogd listens for for messages on UDP port 514.
+ </p>
+ </dd>
+ <dt><span class="code">TelnetAppender</span></dt>
+ <dd>
+ <p>
+ The <span class="code">TelnetAppender</span> accepts socket connections and streams
+ logging messages back to the client. The output is provided in a telnet-friendly way
+ so that a log can be monitored over a TCP/IP socket.
+ This allows simple remote monitoring of application logging.
+ </p>
+ </dd>
+ </dl>
+ <h3>Added new <span class="code">LoggerMatchFilter</span> filter</h3>
+ <p>
+ Added <span class="code">LoggerMatchFilter</span> which matches a string against
+ the event's logger name.
+ </p>
+ <h3>Pluggable file locking models for the <span class="code">FileAppender</span></h3>
+ <p>
+ The <span class="code">FileAppender</span> (and by extension the
+ <span class="code">RollingFileAppender</span>) now support pluggable file
+ locking models. The default model, <span class="code">ExclusiveLock</span>,
+ maintains the current exclusive file locking behavior. An alternative
+ model, <span class="code">MinimalLock</span>, can be used to support writing to
+ a single output file from multiple processes.
+ </p>
+ <p>
+ For full details see the SDK Reference entry: <a href="sdk/html/T_log4net_Appender_FileAppender_LockingModel.htm">log4net.Appender.FileAppender.LockingModel</a>.
+ </p>
+ <h3><span class="code">RollingFileAppender</span> roll once</h3>
+ <p>
+ The <span class="code">RollingFileAppender</span> now supports a new
+ rolling style, <span class="code">Once</span>. In this mode the appender
+ will roll the file once per run.
+ </p>
+ <h3><span class="code">SmtpAppender</span> authentication</h3>
+ <p>
+ On the .NET 1.1 platform only, the <span class="code">SmtpAppender</span> supports authenticating
+ against the mail server using either username and password or integrated NTLM authentication.
+ </p>
+ <h3><span class="code">AdoNetAppender</span> ReconnectOnError</h3>
+ <p>
+ Added new configuration property to <span class="code">AdoNetAppender</span>.
+ Setting <span class="code">ReconnectOnError</span> to <span class="code">true</span>
+ will force the appender to attempt to reconnect to the database if the connection
+ is lost.
+ </p>
+ <h3><span class="code">UdpAppender</span> hostname support</h3>
+ <p>
+ The <span class="code">UdpAppender</span> config property <span class="code">RemoteAddress</span>
+ can now be specified as a DNS hostname string. The hostname is resolved to an IP address.
+ </p>
+ </section>
+
+ <section id="1.2.9-other" name="Other Changes">
+ <h3>FxCop compliance</h3>
+ <p>
+ Updates to bring the internal code in line with the current FxCop rules.
+ </p>
+ <h3>Separate NUnit tests</h3>
+ <p>
+ Moved the NUnit tests into a separate project, <span class="code">log4net.Tests</span>.
+ </p>
+ <h3>Bug Fixes</h3>
+ <dl>
+ <dt><span class="code">RemotingAppender</span></dt>
+ <dd>
+ <p>
+ Sends events from a <span class="code">ThreadPool</span> thread
+ rather than the calling thread to prevent transfer,
+ and potential loss, of the <span class="code">CallContext</span>.
+ </p>
+ </dd>
+ <dt><span class="code">RollingFileAppender</span></dt>
+ <dd>
+ <p>
+ Fixed date rolling period detection for non UTC timezones.
+ </p>
+ </dd>
+ <dt><span class="code">ColoredConsoleAppender</span></dt>
+ <dd>
+ <p>
+ Updated to support writing more than 30,000 chars in a single message.
+ Fixed background color overspill if the console window needs to
+ scroll the contents.
+ </p>
+ </dd>
+ </dl>
+ </section>
+
+ </section>
+
+ <section id="1.2.0b8" name="1.2.0 Beta 8">
+ <h3>Changed assembly name to <span class="code">log4net</span></h3>
+ <p>
+ The build output is now <span class="code">log4net.dll</span>
+ for all frameworks. This is a breaking change.
+ </p>
+ <p>
+ To resolve cross platform and cross version issues we have
+ changed the log4net assembly to use a common name for all
+ frameworks. The assembly friendly name is now <span class="code">log4net</span>.
+ The builds for each framework can now be differentiated
+ by the assembly title. This includes the name of the framework
+ that the assembly was built on.
+ </p>
+ <h3>Combined Release and ReleaseStrong builds</h3>
+ <p>
+ The Release and ReleaseStrong builds have been consolidated into
+ a single build called Release. This Release build is strongly named.
+ </p>
+ <h3>New Appender: ColoredConsoleAppender</h3>
+ <p>
+ The <span class="code">ColoredConsoleAppender</span> writes events to the
+ application's console. It can be configured to specify the text and background
+ colors for different level events.
+ </p>
+ <h3>New Appender: SmtpPickupDirAppender</h3>
+ <p>
+ The <span class="code">SmtpPickupDirAppender</span> generates SMTP compliant
+ messages and writes them to a local directory. These files can then be read
+ by an SMTP agent (e.g. the IIS SMTP Agent) and delivered.
+ </p>
+ <h3>New Layout: XmlLayoutSchemaLog4j</h3>
+ <p>
+ This new layout formats the logging events as XML which complies with
+ the Apache log4j™ event dtd. This can be used to transfer log event from log4net
+ to log4j. Currently the only appender that can communicate directly with
+ log4j is the <span class="code">UdpAppender</span>.
+ </p>
+ <h3>New PatternLayout conversion characters</h3>
+ <p>
+ Added support for capturing the current thread principal name and the
+ app domain friendly name for each logging event.
+ </p>
+ <dl>
+ <dt>%a</dt>
+ <dd>
+ Used to output the friendly name of the AppDomain where the
+ logging event was generated.
+ </dd>
+ <dt>%u</dt>
+ <dd>
+ Used to output the user name for the currently active user
+ (<span class="code">Principal.Identity.Name</span>).
+ </dd>
+ </dl>
+ <h3>Types specified in the config file are now loaded ignoring case</h3>
+ <p>
+ All types specified in the configuration files are now loaded
+ using a case insensitive method.
+ </p>
+ <h3>Fine grained fixing for buffered events</h3>
+ <p>
+ The <span class="code">LoggingEvent</span> now supports fine grained
+ fixing of data that needs to be accessed outside the append context,
+ e.g. when an event is buffered. The new <span class="code">Fix</span>
+ property takes a combination of the <span class="code">FixFlags</span>
+ enumeration values.
+ </p>
+ <h3>Code updated inline with FxCop 1.21</h3>
+ <p>
+ In line with the FxCop 1.21 guidelines:
+ Sealed utility classes. Added serialization security demand to GetObjectData.
+ Renamed parameters.
+ </p>
+ <h3>EventLogAppender 32K Limit</h3>
+ <p>
+ There is a limit of 32K characters in an EventLog message. Added a
+ check that only logs the first 32000 characters from the rendered
+ message.
+ </p>
+ </section>
+
+ <section id="1.2.0b7" name="1.2.0 Beta 7">
+ <h3>Updated to support the Microsoft .NET Framework 1.1 Final</h3>
+ <p>
+ Updated to support the Microsoft .NET Framework 1.1 Final Beta (1.1.4322).
+ </p>
+ <h3>Features document</h3>
+ <p>
+ Added a new document that covers the main features of log4net.
+ See the <a href="features.html">features</a>
+ document for more information.
+ </p>
+ <h3>Hierarchy disabled until it is configured</h3>
+ <p>
+ The Hierarchy is now disabled until it has been configured.
+ All messages logged to the Hierarchy before it has been
+ configured will be ignored without an error message being
+ written to the console.
+ </p>
+ <p>
+ If you are configuring log4net programmatically (i.e. not using
+ one of the built-in configurators) you must set the
+ <span class="code">ILoggerRepository.Configured</span> property
+ to <span class="code">true</span> once you have configured
+ the repository.
+ </p>
+ <p>
+ The no appenders defined for a logger message will no longer be
+ displayed on the console by default. This message will only be
+ displayed if internal debugging is enabled.
+ </p>
+ <h3>New examples in VisualBasic.NET, JScript and Managed C++</h3>
+ <p>
+ New examples in VisualBasic.NET, JScript and Managed C++.
+ TODO Link to document about examples.
+ </p>
+ <h3>Code and Documentation Updates</h3>
+ <p>
+ Code fixes. Documentation and manual updates.
+ See the ChangeLog for more information.
+ </p>
+ <h3>Added document with example appender configurations</h3>
+ <p>
+ See the <a href="config-examples.html">Example Appender Configuration</a>
+ document for more information.
+ </p>
+ </section>
+
+ <section id="1.2.0b6" name="1.2.0 Beta 6">
+ <h3>Added support for multiple frameworks</h3>
+ <p>
+ log4net 1.2.0 beta 6 adds support for the the following frameworks:
+ </p>
+ <div class="table">
+ <table cellspacing="0">
+ <colgroup>
+ <col style="text-align: left;" />
+ </colgroup>
+ <tr>
+ <th>
+ Framework</th>
+ <th>
+ Website</th>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Microsoft .NET Framework 1.1 Final Beta (1.1.4322)</td>
+ <td><a href="http://msdn.microsoft.com/net">http://msdn.microsoft.com/net</a></td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Microsoft .NET Compact Framework 1.0 (1.0.5000)</td>
+ <td><a href="http://msdn.microsoft.com/vstudio/device/compactfx.asp">http://msdn.microsoft.com/vstudio/device/compactfx.asp</a></td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Mono 0.23</td>
+ <td><a href="http://www.go-mono.org">http://www.go-mono.org</a></td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>Microsoft Shared Source CLI 1.0</td>
+ <td><a href="http://msdn.microsoft.com/library/en-us/dndotnet/html/mssharsourcecli.asp">http://msdn.microsoft.com/library/en-us/dndotnet/html/mssharsourcecli.asp</a></td>
+ </tr>
+ </table>
+ </div>
+ <br />
+ <p>
+ Not all frameworks are created equal and some features have been excluded from
+ some of the builds. See the <a href="framework-support.html">Framework Support</a> document for more information.
+ </p>
+ <h3>New build system using NAnt</h3>
+ <p>
+ The new build system allows log4net to be built for all supported frameworks and
+ in all build configurations in one go.
+ </p>
+ <h3>New source code & distribution layout</h3>
+ <p>
+ The source code & distribution layout has been updated to support the new
+ build environment and multiple target frameworks.
+ </p>
+ <h3>Removed DomainAttribute.UseDefaultDomain property</h3>
+ <p>
+ Updated default behavior of <span class="code">DefaultRepositorySelector</span>. Assemblies
+ are now by default placed into the default domain. To specify another domain,
+ the <span class="code">DomainAttribute</span> must be used. This is the opposite behavior
+ to what was previously available. If you were previously specifying the <span class="code">DomainAttribute.UseDefaultDomain</span>
+ property then you should remove it, and if the default behavior is now
+ sufficient, you do not need to specify the <span class="code">DomainAttribute</span> at all.
+ </p>
+ <h3>Updated configuration file parser</h3>
+ <p>
+ Updated config file parser to use the element name as the property to set. Also
+ removed <span class="code"><object></span> tag, the type attribute can now be
+ specified on the property element directly.
+ </p>
+ <p>
+ For example:
+ </p>
+ <div class="syntax"><pre class="code">
+<appender>
+ <param name="Evaluator">
+ <object type="log4net.spi.LevelEvaluator">
+ <constructor>
+ <param type="log4net.spi.Level" value="DEBUG"/>
+ </constructor>
+ </object>
+ </param>
+</appender></pre></div>
+ <p>
+ becomes:
+ </p>
+ <div class="syntax"><pre class="code">
+<appender>
+ <evaluator type="log4net.spi.LevelEvaluator">
+ <threshold value="DEBUG"/>
+ </evaluator>
+</appender></pre></div>
+ <h3>Support for event ID</h3>
+ <p>
+ The <span class="code">EventLogAppender</span> now supports setting the event ID in the
+ event log, this is taken from the <span class="code">EventID</span> property from the per
+ event <span class="code">Properties</span> map on the <span class="code">LoggingEvent</span>.
+ </p>
+ <h3>Updated ADONetAppender</h3>
+ <p />
+ <ul>
+ <li>
+ Added support for prepared statements and stored procedures</li>
+ <li>
+ Added <span class="code">RawTimeStampLayout</span>to correctly convert the timestamps into
+ database date time format</li>
+ <li>
+ Added <span class="code">ExceptionLayout</span> to render the exception data</li>
+ </ul>
+ <p />
+ <h3>Support for front-end extension</h3>
+ <p>
+ This allows the logging API to be wrapped or adapted for specific purposes. Two
+ extension samples are included in the distribution:
+ </p>
+ <div class="table">
+ <table cellspacing="0">
+ <colgroup>
+ <col style="width: 50%; text-align: left;" />
+ <col style="width: 50%; text-align: left;" />
+ </colgroup>
+ <tr>
+ <th>
+ Extension</th>
+ <th>
+ Description</th>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>log4net.Ext.Trace</td>
+ <td>Adds trace logging methods</td>
+ </tr>
+ <tr style="vertical-align: top;">
+ <td>log4net.Ext.EventID</td>
+ <td>Adds additional eventId parameter to all methods</td>
+ </tr>
+ </table>
+ </div>
+ <p />
+ <h3>Added ForwardingAppender</h3>
+ <p>Forwards events to multiple sub appenders after applying filter rules.</p>
+ <h3>Added BufferingForwardingAppender</h3>
+ <p>Forward events to sub appenders after buffering them.</p>
+ <h3>Added ASPNetTraceAppender</h3>
+ <p>Logs events to the ASP.NET trace system.</p>
+ <h3>Added NetSendAppender</h3>
+ <p>Delivers logging events using the Windows Messenger service.</p>
+ <h3>Added UdpAppender</h3>
+ <p>Sends logging events as connectionless UDP datagrams to a remote host or a
+ multicast group.</p>
+ <h3>Removed obsolete methods</h3>
+ <h3>Lots of updates to improve our compliance with FxCop</h3>
+ <h3>Improved SDK documentation</h3>
+ </section>
+
+ <section id="1.2.0b5" name="1.2.0 Beta 5">
+ <h3>Fixed Exception thrown when DOM Configurator called with a null XML
+ Element.</h3>
+ <p>This occurred if the configuration file did not have a log4net section defined.</p>
+ <h3>Made level lookup case insensitive</h3>
+ <h3>Prevented the Hierarchy's Threshold level from being set to a null reference</h3>
+ </section>
+
+ <section id="1.2.0b4" name="1.2.0 Beta 4">
+ <h3>Added event specific properties to the logging event object</h3>
+ <p>
+ Appenders can add additional information to the events they are logging. The <span class="code">RemotingAppender</span>
+ and the <span class="code">SMTPAppender</span> both add a 'hostname' property to the events.
+ These properties can be accessed using the <span class="code">PatternLayout</span> with the
+ %P{name} syntax.
+ </p>
+ <h3>Added a plugin framework</h3>
+ <p>An <span class="code">IPlugin</span> interface can be attached to any repository.</p>
+ <h3>A new RemoteLoggingServerPlugin plugin acts as the server for the
+ RemotingAppender</h3>
+ <h3>Updated the core log4net framework to work in an environment with no
+ permissions</h3>
+ <p>Specific appenders still require additional permissions to log correctly</p>
+ <h3>Added support for domain aliasing using the AliasDomainAttribute</h3>
+ <p>This allows a parent assembly to take control of the logging domain for child
+ assemblies.</p>
+ <h3>Added events for repository creation, configuration change, configuration reset
+ and repository shutdown</h3>
+ <h3>Added LevelMap to the ILoggerRepository interface</h3>
+ <p>The mapping from level name to level object is now repository specific,
+ therefore each repository can have independent mappings.</p>
+ <h3>Moved hierarchy specific config file parser to new DOMHierarchyConfigurator class</h3>
+ <p>This is controlled by the <span class="code">Hierarchy</span> object and allows for better
+ encapsulation.</p>
+ <h3>Added OnlyFixPartialEventData property to the buffered appenders</h3>
+ <p>This setting causes slow settings to be ignored. This significantly improves the
+ performance of the buffered appenders.</p>
+ <h3>XML entity references are supported in the XML config file.</h3>
+ <h3>Added support for expanding environment variables in <param> values</h3>
+ <p>
+ The environment variables must be specified as <span class="code">${FOO}</span> where <span class="code">FOO</span>
+ is the name of the variable to expand.
+ </p>
+ <h3>Upgraded to use NUnit 2.0</h3>
+ <h3>File appenders can specify the encoding to use for the file</h3>
+ <h3>Added strong named configuration</h3>
+ </section>
+
+ <section id="1.2.0b3" name="1.2.0 Beta 3">
+ <h3>Added log4net.Ext.Trace extension</h3>
+ <p>This is a separate assembly that adds a trace level to log4net.</p>
+ <h3>The default log file output directory is now the application base directory not
+ the current directory</h3>
+ <h3>Added MemoryAppender</h3>
+ <p>Stores all the logging events in an in-memory buffer.</p>
+ <h3>Moved the Hierarchy implementation into a separate namespace</h3>
+ <p>
+ The <span class="code">log4net.Repository.Hierarchy</span> namespace now contains all the
+ code that is specific to the <span class="code">Hierarchy</span> implementation.
+ </p>
+ <h3>Refactored the DOMConfigurator and BasicConfigurator</h3>
+ <p>
+ The <span class="code">Hierarchy</span> specific data schema and implementation could be has
+ now been moved to the <span class="code">log4net.Repository.Hierarchy</span> namespace. The
+ bootstrap code for these configurators remains in the <span class="code">log4net.Config</span>
+ namespace.
+ </p>
+ <h3>Replaced the DOMConfiguratorAttribute UseExecutableDomain
+ property with UseDefaultDomain</h3>
+ <p>
+ This change to the implementation of the <span class="code">DOMConfiguratorAttribute</span> should
+ allow the configuration of multiple assemblies to be accomplished more easily,
+ especially when developing web applications (ASP.NET).
+ </p>
+ <h3>A few good bug fixes!</h3>
+ </section>
+
+ <section id="1.2.0b2" name="1.2.0 Beta 2">
+ <h3>Added ADONetAppender</h3>
+ <p>Thanks to TechnologyOneCorp.com.</p>
+ <h3>Added TraceLogAssembly extensibility example</h3>
+ <h3>Lots of bug fixes</h3>
+ </section>
+
+ <section id="1.2.0b1" name="1.2.0 Beta 1">
+ <h3>Added 6 new examples</h3>
+ <h3>Split Category class into Logger and LogManager classes</h3>
+ <p>
+ The instance methods from <span class="code">Category</span> have moved to the <span class="code">Logger</span>
+ class. The static methods from <span class="code">Category</span> have moved to the <span class="code">LogManager</span>
+ class. The <span class="code">Category</span> class still exists but for backward
+ compatibility only. Changed interface <span class="code">ICategoryFactory</span> to <span class="code">ILoggerFactory</span>
+ and the implementation class <span class="code">DefaultCategoryFactory</span> to <span class="code">DefaultLoggerFactory</span>.
+ </p>
+ <h3>Replaced Priority class with Level class</h3>
+ <p>
+ The <span class="code">Priority</span> class has been replaced by the <span class="code">Level</span> class.
+ The <span class="code">Priority</span> class still exists for backward compatibility only.
+ The <span class="code">Level</span> class implements a static pool of <span class="code">Level</span> objects.
+ The <span class="code">Level</span> class is sealed and serializable.
+ </p>
+ <h3>Added ILoggerRepository interface implemented by Hierarchy</h3>
+ <p>
+ The <span class="code">Hierarchy</span> class implements the <span class="code">ILoggerRepository</span> interface.
+ This interface is used by the <span class="code">LogManager</span> class and therefore
+ allows different implementations of <span class="code">ILoggerRepository</span> to be used.
+ </p>
+ <h3>Enhanced NUnit tests</h3>
+ <p>
+ All the NUnit tests can be run using a single TestSuite: NUnitGUI
+ log4net.LogManager+AllTests,log4net.dll.
+ </p>
+ <h3>Added support for serializing LoggingEvents</h3>
+ <p>
+ The <span class="code">LoggingEvent</span> class is serializable. All local state is
+ captured before serialization occurs. This now allows <span class="code">LoggingEvent</span>
+ objects to be serialized between applications or machines.
+ </p>
+ <h3>Added RemotingAppender</h3>
+ <p>
+ Delivers <span class="code">LoggingEvents</span> to a remote interface. This can be used to
+ collect distributed logging into a single log file. There is an example
+ remoting sink that receives the logging events, see <span class="code">examples\net\remoting\RemotingServer</span>
+ for details.
+ </p>
+ <h3>Added support for rendering composite objects</h3>
+ <p>
+ The <span class="code">IObjectRenderer</span> interface method <span class="code">DoRender</span> now
+ takes a <span class="code">RendererMap</span> argument. This allows the renderer to use the
+ appropriate renderer from the <span class="code">RendererMap</span> to render any nested
+ objects.
+ </p>
+ <h3>Added support for rendering exceptions</h3>
+ <p>
+ The <span class="code">DefaultRenderer</span> now has support for rendering exceptions to a
+ string. This includes nested exceptions. The <span class="code">RendererMap</span> is now
+ used to render exceptions in the <span class="code">LoggingEvent</span>. This allows the
+ rendering of specific exceptions to be enhanced by specific renderers.
+ </p>
+ <h3>Added ITriggeringEventEvaluator interface</h3>
+ <p>
+ This interface is used by <span class="code">SMTPAppender</span> and <span class="code">RemotingAppender</span>
+ to determine if a <span class="code">LoggingEvent</span> meets a set of user defined
+ criteria. These appenders use the interface to determine whether or not to
+ deliver the current buffer of events to their listener. The interface is
+ implemented by the <span class="code">LevelEvaluator</span> class, which triggers above a
+ set level.
+ </p>
+ <h3>Added regex matching to the MDCFilter, NDCFilter and StringMatchFilter</h3>
+ <p>
+ The <span class="code">MDCFilter</span>, <span class="code">NDCFilter</span> and <span class="code">StringMatchFilter</span>
+ can now be configured to use regex matches in addition to substring matches.
+ Set the <span class="code">RegexToMatch</span> property to use this feature.
+ </p>
+ <h3>Added XMLLayout</h3>
+ <p>
+ emits an XML element for each <span class="code">LoggingEvent</span>. This allows logging
+ events to be stored and manipulated as XML. The DTD for the XML emitted is in
+ the <span class="code">log4net-events.dtd</span>
+ </p>
+ <h3>Added support for <logger> and <level> elements in the
+ DOMConfigurator</h3>
+ <p>
+ As the <span class="code">Category</span> and <span class="code">Priority</span> classes have been
+ replaced by the <span class="code">Logger</span> and <span class="code">Level</span> classes. The <span class="code">DOMConfigurator</span>
+ has been updated to allow the <span class="code"><logger></span> and <span class="code"><level></span>
+ elements to be used in place of the <span class="code"><category></span> and <span class="code"><priority></span>
+ elements. The old elements are still accepted for backward compatibility.
+ </p>
+ <h3>Added Threshold property to Hierarchy</h3>
+ <p>
+ Changed <span class="code">DisableXXX()</span> methods on <span class="code">Hierarchy</span> to a <span class="code">Threshold</span>
+ property.
+ </p>
+ <h3>Added support for logging domains</h3>
+ <p>
+ The <span class="code">LogManager</span> supports multiple logging domains. The <span class="code">LogManager</span>
+ uses an instance of the <span class="code">IRepositorySelector</span> class to map from
+ domains to <span class="code">ILoggerRepository</span> instances. The default implementation
+ is to have a separate <span class="code">ILoggerRepository</span> for each domain. When a
+ call is made to the static methods on <span class="code">LogManager</span> the domain can be
+ specified (as a string) or the domain can be inferred automatically from the
+ calling assembly. The default behavior is for each assembly loaded into the
+ process to have its own domain and <span class="code">ILoggerRepository</span>. These can
+ each be configured separately. This allows standalone assemblies to use log4net
+ without conflicting with other modules in the process. The domain for the
+ assembly is configured using metadata attributes defined on the assembly.
+ </p>
+ <h3>DOMConfigurator can set params to arbitrary objects</h3>
+ <p>
+ Using a new <span class="code"><object></span> element, params can now be set to any
+ creatable object.
+ </p>
+ </section>
+
+ </section>
+ </body>
+</document>
diff --git a/src/site/xdoc/release/security-reports.xml b/src/site/xdoc/release/security-reports.xml
new file mode 100644
index 0000000..30c57bd
--- /dev/null
+++ b/src/site/xdoc/release/security-reports.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<!--
+
+ 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.
+-->
+<document>
+ <properties>
+ <title>Apache log4net: Security Reports</title>
+ <author email="dev@logging.apache.org">Logging Documentation Team</author>
+ </properties>
+ <body>
+ <section name="General Information">
+ <p>For information about reporting or asking questions about
+ security problems, please see the <a
+ href="https://logging.apache.org/security.html">security page
+ of the Logging project</a>.</p>
+ </section>
+
+ <section name="Apache log4net Security Vulnerabilities">
+ <p>This page lists all security vulnerabilities fixed in
+ released versions of Apache log4net. Each
+ vulnerability is given a security impact rating by the
+ development team - please note that this rating may vary from
+ platform to platform. We also list the versions of log4net the
+ flaw is known to affect, and where a flaw has not
+ been verified list the version with a question mark.</p>
+
+ <p>Please note that binary patches are never provided. If you
+ need to apply a source code patch, use the building
+ instructions for the log4net version that you are
+ using.</p>
+
+ <p>If you need help on building log4net or other help
+ on following the instructions to mitigate the known
+ vulnerabilities listed here, please send your questions to the
+ public <a href="../mail-lists.html">Logging Users mailing
+ list</a>.</p>
+
+ <p>If you have encountered an unlisted security vulnerability
+ or other unexpected behaviour that has security impact, or if
+ the descriptions here are incomplete, please report them
+ privately to the Apache Security Team. Thank you.</p>
+
+ </section>
+
+ <section name="Errors and Ommissions">
+ <p>Please report any errors or omissions to <a
+ href="../mail-lists.html">the dev mailing list</a>.</p>
+ </section>
+ </body>
+</document>