blob: a2265736600123b2465223b4ccc2a7eaa5d781ae [file] [log] [blame]
<html>
<head>
<title>
log4cxx - Documentation
</title>
<link href="../css/doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body bgcolor="#ffffff" text="#000000" link="#525D76">
<!-- START Header table -->
<table border="0" cellspacing="0" width="90%">
<!-- TOP IMAGE -->
<tr>
<td colspan="2">
<a href="http://logging.apache.org">
<img src="http://logging.apache.org/images/ls-logo.jpg" align="left" border="0"/>
</a>
</td>
</tr>
</table>
<!-- END Header table -->
<!-- START main table -->
<table id="main" border="0" width="90%" cellspacing="2" cellpadding="0">
<tr><td colspan="2">
<hr noshade="" size="1"/>
</td></tr>
<tr>
<!-- LEFT SIDE NAVIGATION -->
<td id="navbar" valign="top">
<!-- ============================================================ -->
<table id="navbar" border="0" cellspacing="0" cellpadding="0">
<tr >
<td class="navbarHeader" nowrap="true">
<strong>Apache</strong>
</td>
</tr>
<tr><td class="navbarItem"><small> <a href="http://www.apache.org">Apache Home</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="http://logging.apache.org/">Logging Services</a>
</small></td></tr>
<tr >
<td class="navbarHeader" nowrap="true">
<strong>log4cxx project</strong>
</td>
</tr>
<tr><td class="navbarItem"><small> <a href="../index.html">About</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../news.html">News</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../team.html">Team</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../manual/index.html">Documentation</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../performance.html">Performance</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../download.html">Download</a>
</small></td></tr>
</table>
</td>
<td id="mainContents" align="left" valign="top">
<hr>
<!-- Generated by Doxygen 1.3.5 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a></div>
<h1>LogManager Class Reference</h1>Collaboration diagram for LogManager:<p><center><img src="classlog4cxx_1_1LogManager__coll__graph.png" border="0" usemap="#LogManager__coll__map" alt="Collaboration graph"></center>
<map name="LogManager__coll__map">
<area href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html" shape="rect" coords="13,18,85,42" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classlog4cxx_1_1LogManager-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1LogManager.html#e0">setRepositorySelector</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">spi::RepositorySelectorPtr</a> selector, void *guard)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">LoggerPtr</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1LogManager.html#e2">getRootLogger</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">LoggerPtr</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1LogManager.html#e3">getLogger</a> (const String &amp;name)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">LoggerPtr</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1LogManager.html#e4">getLogger</a> (const String &amp;name, <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">spi::LoggerFactoryPtr</a> factory)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1LogManager.html#e7">shutdown</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1LogManager.html#e8">resetConfiguration</a> ()</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Use the <code><a class="el" href="classlog4cxx_1_1LogManager.html">LogManager</a></code> class to retreive <a class="el" href="classlog4cxx_1_1Logger.html">Logger</a> instances or to operate on the current <a class="el" href="classlog4cxx_1_1spi_1_1LoggerRepository.html">LoggerRepository</a>. When the <code><a class="el" href="classlog4cxx_1_1LogManager.html">LogManager</a></code> class is loaded into memory the default initialization procedure is inititated.
<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="e4" doxytag="log4cxx::LogManager::getLogger" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">LoggerPtr</a> getLogger </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const String &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>name</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap><a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">spi::LoggerFactoryPtr</a>&nbsp;</td>
<td class="mdname" nowrap> <em>factory</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Retrieve the appropriate <a class="el" href="classlog4cxx_1_1Logger.html">Logger</a> instance. </td>
</tr>
</table>
<a class="anchor" name="e3" doxytag="log4cxx::LogManager::getLogger" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">LoggerPtr</a> getLogger </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const String &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>name</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Retrieve the appropriate <a class="el" href="classlog4cxx_1_1Logger.html">Logger</a> instance. </td>
</tr>
</table>
<a class="anchor" name="e2" doxytag="log4cxx::LogManager::getRootLogger" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">LoggerPtr</a> getRootLogger </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Retrieve the appropriate root logger. </td>
</tr>
</table>
<a class="anchor" name="e8" doxytag="log4cxx::LogManager::resetConfiguration" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void resetConfiguration </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Reset all values contained in this current <a class="el" href="classlog4cxx_1_1spi_1_1LoggerRepository.html">LoggerRepository</a> to their default. </td>
</tr>
</table>
<a class="anchor" name="e0" doxytag="log4cxx::LogManager::setRepositorySelector" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void setRepositorySelector </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">spi::RepositorySelectorPtr</a>&nbsp;</td>
<td class="mdname" nowrap> <em>selector</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>void *&nbsp;</td>
<td class="mdname" nowrap> <em>guard</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Sets <code>LoggerFactory</code> but only if the correct <em>guard</em> is passed as parameter.<p>
Initally the guard is null. If the guard is <code>null</code>, then invoking this method sets the logger factory and the guard. Following invocations will throw a <a class="el" href="classlog4cxx_1_1helpers_1_1IllegalArgumentException.html">IllegalArgumentException</a>, unless the previously set <code>guard</code> is passed as the second parameter.<p>
This allows a high-level component to set the <a class="el" href="classlog4cxx_1_1spi_1_1RepositorySelector.html">RepositorySelector</a> used by the <code><a class="el" href="classlog4cxx_1_1LogManager.html">LogManager</a></code>. </td>
</tr>
</table>
<a class="anchor" name="e7" doxytag="log4cxx::LogManager::shutdown" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void shutdown </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Safely close and remove all appenders in all loggers including the root logger. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li>logmanager.h<li>logmanager.cpp</ul>
</td>
</tr>
<!-- FOOTER -->
<tr><td colspan="2">
<hr noshade="" size="1"/>
</td></tr>
<tr><td colspan="2">
<div align="center"><font color="#525D76" size="-1"><em>
Copyright &#169; 1999-2004, Apache Software Foundation
</em></font></div>
</td></tr>
</table>
<!-- END main table -->
</body>
</html>
<!-- end the processing -->