blob: 519ca224c5cd2f90da729618eab6cc5f6200586d [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Generated by Apache Maven Doxia at 2015-11-07 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Apache log4net &#x2013; Apache log4net Manual: Plugins</title>
<style type="text/css" media="all">
@import url("../../css/maven-base.css");
@import url("../../css/maven-theme.css");
@import url("../../css/site.css");
</style>
<link rel="stylesheet" href="../../css/print.css" type="text/css" media="print" />
<meta name="author" content="Nicko Cadell" />
<meta name="Date-Revision-yyyymmdd" content="20151107" />
<meta http-equiv="Content-Language" content="en" />
<meta name="keywords" content="log4net plugins, log4net" />
</head>
<body class="composite">
<div id="banner">
<a href="../../../" id="bannerLeft">
<img src="../../images/ls-logo.jpg" alt="Apache Logging Services Project" />
</a>
<div class="clear">
<hr/>
</div>
</div>
<div id="breadcrumbs">
<div class="xleft">
<span id="publishDate">Last Published: 2015-11-07</span>
&nbsp;| <span id="projectVersion">Version: 1.2.14</span>
| <a href="http://www.apache.org/" class="externalLink" title="Apache">Apache</a>
&gt;
<a href="../../../" title="Logging Services">Logging Services</a>
&gt;
<a href="../.././" title="log4net">log4net</a>
&gt;
Apache log4net &#x2013; Apache log4net Manual: Plugins
</div>
<div class="xright">
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="leftColumn">
<div id="navcolumn">
<h5>Apache log4net</h5>
<ul>
<li class="none">
<a href="../../index.html" title="About">About</a>
</li>
<li class="none">
<a href="../../download_log4net.cgi" title="Download">Download</a>
</li>
<li class="none">
<a href="../../release/release-notes.html" title="Release Notes">Release Notes</a>
</li>
<li class="none">
<a href="../../license.html" title="License">License</a>
</li>
</ul>
<h5>Documentation</h5>
<ul>
<li class="none">
<a href="../../release/features.html" title="Features">Features</a>
</li>
<li class="none">
<a href="../../release/framework-support.html" title="Supported Frameworks">Supported Frameworks</a>
</li>
<li class="none">
<a href="../../release/example-apps.html" title="Example Apps">Example Apps</a>
</li>
<li class="none">
<a href="../../release/config-examples.html" title="Config Examples">Config Examples</a>
</li>
<li class="none">
<a href="../../release/building.html" title="Building">Building</a>
</li>
<li class="none">
<a href="../../release/faq.html" title="FAQ">FAQ</a>
</li>
<li class="none">
<a href="../../release/howto/index.html" title="How Tos">How Tos</a>
</li>
<li class="none">
<a href="../../release/sdk/index.html" title="SDK Reference">SDK Reference</a>
</li>
</ul>
<h5>Manual</h5>
<ul>
<li class="none">
<a href="../../release/manual/introduction.html" title="Introduction">Introduction</a>
</li>
<li class="none">
<a href="../../release/manual/configuration.html" title="Configuration">Configuration</a>
</li>
<li class="none">
<a href="../../release/manual/contexts.html" title="Contexts">Contexts</a>
</li>
<li class="none">
<strong>Plugins</strong>
</li>
<li class="none">
<a href="../../release/manual/repositories.html" title="Repositories">Repositories</a>
</li>
<li class="none">
<a href="../../release/manual/internals.html" title="Internals">Internals</a>
</li>
</ul>
<h5>Community</h5>
<ul>
<li class="none">
<a href="../../mail-lists.html" title="Mailing Lists">Mailing Lists</a>
</li>
<li class="none">
<a href="../../issue-tracking.html" title="Issue Tracking">Issue Tracking</a>
</li>
</ul>
<h5>Development</h5>
<ul>
<li class="none">
<a href="../../source-repository.html" title="Repository">Repository</a>
</li>
<li class="none">
<a href="../../integration.html" title="Continuous Integration">Continuous Integration</a>
</li>
</ul>
<h5>Project Documentation</h5>
<ul>
<li class="collapsed">
<a href="../../project-info.html" title="Project Information">Project Information</a>
</li>
</ul>
<h5>Apache</h5>
<ul>
<li class="none">
<a href="http://www.apache.org/" class="externalLink" title="Home">Home</a>
</li>
<li class="none">
<a href="http://www.apache.org/licenses/" class="externalLink" title="License">License</a>
</li>
<li class="none">
<a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship">Sponsorship</a>
</li>
<li class="none">
<a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks">Thanks</a>
</li>
<li class="none">
<a href="http://www.apache.org/security/" class="externalLink" title="Security">Security</a>
</li>
<li class="none">
<a href="http://www.apachecon.com" class="externalLink" title="Conferences">Conferences</a>
</li>
</ul>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img class="poweredBy" alt="Built by Maven" src="../../images/logos/maven-feather.png" />
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<!-- Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<a name="main"></a>
<div class="section" id="main">
<h2><a name="Apache_log4net_Manual_-_Plugins"></a>Apache log4net&#x2122; Manual - Plugins</h2>
<a name="plugins"></a>
<div class="section" id="plugins">
<h2><a name="Plugins"></a>Plugins</h2>
<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 border="0" class="bodyTable" cellspacing="0">
<tr class="a">
<th>
Type</th>
<th>
Description</th>
</tr>
<tr class="b">
<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>
<div class="section">
<h3><a name="RemoteLoggingServerPlugin"></a>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>
<div class="source">
<pre>
LogManager.GetRepository().PluginMap.Add(new RemoteLoggingServerPlugin(&quot;LoggingSink&quot;));</pre></div>
</li>
</ul>
</div><a name="attributes"></a>
<div class="section" id="attributes">
<h2><a name="Plugin_Attributes"></a>Plugin Attributes</h2>
<p>
Plugins can be configured using the following assembly-level attributes:
</p>
<ul>
<li>
<div class="section">
<h3><a name="PluginAttribute"></a>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>
</div></div>
</div>
</div>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xright">
<div class="xright">Copyright &#169; 2004-2015
<a href="http://www.apache.org">Apache Software Foundation</a>.
Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache Software License, Version 2.0</a>.</div><br />
<div class="xright">Apache log4net, Apache, log4net, the Apache feather logo, the Apache Logging Services project logo and the Built by Maven logo are trademarks of The Apache Software Foundation.</div>
<div class="clear">
</div>
</div>
</body>
</html>