<?xml version="1.0" ?>
<!--
Copyright 2004-2005 The Apache Software Foundation

Licensed 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>log4net Manual - Plugins</title>
	</properties>

	<meta name="keywords" content="log4net plugins, log4net" />

	<body>
		<section name="log4net Manual - Plugins">
			<sectionMenu name="Contents" />

			<section 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 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>
