blob: d33b74b328576c171c8450b2fbec6f0cbb8e5074 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Apache log4cxx: PropertyConfigurator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname"><a href="http://logging.apache.org/log4cxx">Apache log4cxx</a>
&#160;<span id="projectnumber">Version 0.10.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classlog4cxx_1_1_property_configurator.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classlog4cxx_1_1_property_configurator-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">PropertyConfigurator Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Allows the configuration of <a class="el" href="namespacelog4cxx.html">log4cxx</a> from an external file.
<a href="classlog4cxx_1_1_property_configurator.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for PropertyConfigurator:</div>
<div class="dyncontent">
<div class="center">
<img src="classlog4cxx_1_1_property_configurator.png" usemap="#PropertyConfigurator_map" alt=""/>
<map id="PropertyConfigurator_map" name="PropertyConfigurator_map">
<area href="classlog4cxx_1_1spi_1_1_configurator.html" title="Implemented by classes capable of configuring log4j using a URL. " alt="Configurator" shape="rect" coords="0,56,132,80"/>
<area href="classlog4cxx_1_1helpers_1_1_object_impl.html" title="Implementation class for Object. " alt="ObjectImpl" shape="rect" coords="142,56,274,80"/>
<area href="classlog4cxx_1_1helpers_1_1_object.html" title="base class for java-like objects. " alt="Object" shape="rect" coords="0,0,132,24"/>
<area href="classlog4cxx_1_1helpers_1_1_object.html" title="base class for java-like objects. " alt="Object" shape="rect" coords="142,0,274,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5c45e80fd7fc7a76ec62476f22ea67f8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#a5c45e80fd7fc7a76ec62476f22ea67f8">PropertyConfigurator</a> ()</td></tr>
<tr class="separator:a5c45e80fd7fc7a76ec62476f22ea67f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8dae246571f1f0c945268b544788cac5"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#a8dae246571f1f0c945268b544788cac5">~PropertyConfigurator</a> ()</td></tr>
<tr class="separator:a8dae246571f1f0c945268b544788cac5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0198815940c2715c84b0e04828cf8dfa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#a0198815940c2715c84b0e04828cf8dfa">addRef</a> () const </td></tr>
<tr class="separator:a0198815940c2715c84b0e04828cf8dfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55c31efee1904916b999395fa4d46a24"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#a55c31efee1904916b999395fa4d46a24">releaseRef</a> () const </td></tr>
<tr class="separator:a55c31efee1904916b999395fa4d46a24"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2a603ef30c78d771335bf3c83f39a6d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#ad2a603ef30c78d771335bf3c83f39a6d">doConfigure</a> (const <a class="el" href="classlog4cxx_1_1_file.html">File</a> &amp;configFileName, <a class="el" href="namespacelog4cxx_1_1spi.html#a7a69119f966029685ef737ca2d3ce0f0">spi::LoggerRepositoryPtr</a> &amp;hierarchy)</td></tr>
<tr class="memdesc:ad2a603ef30c78d771335bf3c83f39a6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read configuration from a file. <a href="#ad2a603ef30c78d771335bf3c83f39a6d">More...</a><br /></td></tr>
<tr class="separator:ad2a603ef30c78d771335bf3c83f39a6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab561ed5fe9e6be0742817cc261f5a5d9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#ab561ed5fe9e6be0742817cc261f5a5d9">doConfigure</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">helpers::Properties</a> &amp;properties, <a class="el" href="namespacelog4cxx_1_1spi.html#a7a69119f966029685ef737ca2d3ce0f0">spi::LoggerRepositoryPtr</a> &amp;hierarchy)</td></tr>
<tr class="memdesc:ab561ed5fe9e6be0742817cc261f5a5d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read configuration options from <code>properties</code>. <a href="#ab561ed5fe9e6be0742817cc261f5a5d9">More...</a><br /></td></tr>
<tr class="separator:ab561ed5fe9e6be0742817cc261f5a5d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classlog4cxx_1_1spi_1_1_configurator"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classlog4cxx_1_1spi_1_1_configurator')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classlog4cxx_1_1spi_1_1_configurator.html">Configurator</a></td></tr>
<tr class="memitem:aeee06fe7a124ce9144ec483e42fd159a inherit pub_methods_classlog4cxx_1_1spi_1_1_configurator"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_configurator.html#aeee06fe7a124ce9144ec483e42fd159a">Configurator</a> ()</td></tr>
<tr class="separator:aeee06fe7a124ce9144ec483e42fd159a inherit pub_methods_classlog4cxx_1_1spi_1_1_configurator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classlog4cxx_1_1helpers_1_1_object"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classlog4cxx_1_1helpers_1_1_object')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classlog4cxx_1_1helpers_1_1_object.html">Object</a></td></tr>
<tr class="memitem:ae7b62e37794f297c0cede40ed0e84fcd inherit pub_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="classlog4cxx_1_1helpers_1_1_class.html">helpers::Class</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_object.html#ae7b62e37794f297c0cede40ed0e84fcd">getClass</a> () const </td></tr>
<tr class="separator:ae7b62e37794f297c0cede40ed0e84fcd inherit pub_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5cc4f9ba1ea5c2f25bc4b1f0dac5dc5 inherit pub_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_object.html#ab5cc4f9ba1ea5c2f25bc4b1f0dac5dc5">~Object</a> ()</td></tr>
<tr class="separator:ab5cc4f9ba1ea5c2f25bc4b1f0dac5dc5 inherit pub_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ab1bb19059c1de23f8a35cdbc0b6a5c inherit pub_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_object.html#a0ab1bb19059c1de23f8a35cdbc0b6a5c">instanceof</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1_class.html">Class</a> &amp;clazz) const =0</td></tr>
<tr class="separator:a0ab1bb19059c1de23f8a35cdbc0b6a5c inherit pub_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04b3422e17b0a882538bbc99833ab9df inherit pub_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memItemLeft" align="right" valign="top">virtual const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_object.html#a04b3422e17b0a882538bbc99833ab9df">cast</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1_class.html">Class</a> &amp;clazz) const =0</td></tr>
<tr class="separator:a04b3422e17b0a882538bbc99833ab9df inherit pub_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classlog4cxx_1_1helpers_1_1_object_impl"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classlog4cxx_1_1helpers_1_1_object_impl')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classlog4cxx_1_1helpers_1_1_object_impl.html">ObjectImpl</a></td></tr>
<tr class="memitem:a5e6e9fc30dc1f098fee72d516ea0bad0 inherit pub_methods_classlog4cxx_1_1helpers_1_1_object_impl"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_object_impl.html#a5e6e9fc30dc1f098fee72d516ea0bad0">ObjectImpl</a> ()</td></tr>
<tr class="separator:a5e6e9fc30dc1f098fee72d516ea0bad0 inherit pub_methods_classlog4cxx_1_1helpers_1_1_object_impl"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb974728bb3cb991285140c1aa57eed7 inherit pub_methods_classlog4cxx_1_1helpers_1_1_object_impl"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_object_impl.html#abb974728bb3cb991285140c1aa57eed7">~ObjectImpl</a> ()</td></tr>
<tr class="separator:abb974728bb3cb991285140c1aa57eed7 inherit pub_methods_classlog4cxx_1_1helpers_1_1_object_impl"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a066eacbc35934b8a1670c58cd952f292"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#a066eacbc35934b8a1670c58cd952f292">configure</a> (const <a class="el" href="classlog4cxx_1_1_file.html">File</a> &amp;configFilename)</td></tr>
<tr class="memdesc:a066eacbc35934b8a1670c58cd952f292"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read configuration options from file <code>configFilename</code>. <a href="#a066eacbc35934b8a1670c58cd952f292">More...</a><br /></td></tr>
<tr class="separator:a066eacbc35934b8a1670c58cd952f292"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a517ec9e73d2d8db063e40fd13b7f0568"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#a517ec9e73d2d8db063e40fd13b7f0568">configureAndWatch</a> (const <a class="el" href="classlog4cxx_1_1_file.html">File</a> &amp;configFilename)</td></tr>
<tr class="memdesc:a517ec9e73d2d8db063e40fd13b7f0568"><td class="mdescLeft">&#160;</td><td class="mdescRight">Like <a class="el" href="classlog4cxx_1_1_property_configurator.html#a2b3a06f3c9c4224ce1b9ec22011f53d2">configureAndWatch(const File&amp; configFilename, long delay)</a> except that the default delay as defined by <a class="el" href="classlog4cxx_1_1helpers_1_1_file_watchdog.html#a339ae144d23b36d09a21da4767206ea3" title="The default delay between every file modification check, set to 60 seconds. ">helpers::FileWatchdog::DEFAULT_DELAY</a> is used. <a href="#a517ec9e73d2d8db063e40fd13b7f0568">More...</a><br /></td></tr>
<tr class="separator:a517ec9e73d2d8db063e40fd13b7f0568"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b3a06f3c9c4224ce1b9ec22011f53d2"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#a2b3a06f3c9c4224ce1b9ec22011f53d2">configureAndWatch</a> (const <a class="el" href="classlog4cxx_1_1_file.html">File</a> &amp;configFilename, long delay)</td></tr>
<tr class="memdesc:a2b3a06f3c9c4224ce1b9ec22011f53d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read the configuration file <code>configFilename</code> if it exists. <a href="#a2b3a06f3c9c4224ce1b9ec22011f53d2">More...</a><br /></td></tr>
<tr class="separator:a2b3a06f3c9c4224ce1b9ec22011f53d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4654a3965e208a5ef577ccd6abb6b766"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#a4654a3965e208a5ef577ccd6abb6b766">configure</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">helpers::Properties</a> &amp;properties)</td></tr>
<tr class="memdesc:a4654a3965e208a5ef577ccd6abb6b766"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read configuration options from <code>properties</code>. <a href="#a4654a3965e208a5ef577ccd6abb6b766">More...</a><br /></td></tr>
<tr class="separator:a4654a3965e208a5ef577ccd6abb6b766"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_static_methods_classlog4cxx_1_1helpers_1_1_object"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classlog4cxx_1_1helpers_1_1_object')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="classlog4cxx_1_1helpers_1_1_object.html">Object</a></td></tr>
<tr class="memitem:a0bdbda4effe8938c1aca6d4397e5a39d inherit pub_static_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="classlog4cxx_1_1helpers_1_1_class.html">helpers::Class</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_object.html#a0bdbda4effe8938c1aca6d4397e5a39d">getStaticClass</a> ()</td></tr>
<tr class="separator:a0bdbda4effe8938c1aca6d4397e5a39d inherit pub_static_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50ec9288d0b7e3140dee8e24ee74a212 inherit pub_static_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="classlog4cxx_1_1helpers_1_1_class_registration.html">log4cxx::helpers::ClassRegistration</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_object.html#a50ec9288d0b7e3140dee8e24ee74a212">registerClass</a> ()</td></tr>
<tr class="separator:a50ec9288d0b7e3140dee8e24ee74a212 inherit pub_static_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a2b4afba248929ab745252ff4975c319c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#a2b4afba248929ab745252ff4975c319c">configureLoggerFactory</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">helpers::Properties</a> &amp;props)</td></tr>
<tr class="memdesc:a2b4afba248929ab745252ff4975c319c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check the provided <code>Properties</code> object for a <a class="el" href="classlog4cxx_1_1_property_configurator.html#ae66bd943561b32496fb646c0e89e76fd" title="Used to create new instances of logger. ">loggerFactory</a> entry specified by LOGGER_FACTORY_KEY. <a href="#a2b4afba248929ab745252ff4975c319c">More...</a><br /></td></tr>
<tr class="separator:a2b4afba248929ab745252ff4975c319c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d6488d56bc6b2f860e6082394327f6e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#a5d6488d56bc6b2f860e6082394327f6e">configureRootLogger</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">helpers::Properties</a> &amp;props, <a class="el" href="namespacelog4cxx_1_1spi.html#a7a69119f966029685ef737ca2d3ce0f0">spi::LoggerRepositoryPtr</a> &amp;hierarchy)</td></tr>
<tr class="separator:a5d6488d56bc6b2f860e6082394327f6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0309d5be5c7abc1413185db3f58d71fc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#a0309d5be5c7abc1413185db3f58d71fc">parseCatsAndRenderers</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">helpers::Properties</a> &amp;props, <a class="el" href="namespacelog4cxx_1_1spi.html#a7a69119f966029685ef737ca2d3ce0f0">spi::LoggerRepositoryPtr</a> &amp;hierarchy)</td></tr>
<tr class="memdesc:a0309d5be5c7abc1413185db3f58d71fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse non-root elements, such non-root categories and renderers. <a href="#a0309d5be5c7abc1413185db3f58d71fc">More...</a><br /></td></tr>
<tr class="separator:a0309d5be5c7abc1413185db3f58d71fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7eed707b30677da6cc17f97e8354dd94"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#a7eed707b30677da6cc17f97e8354dd94">parseAdditivityForLogger</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">helpers::Properties</a> &amp;props, <a class="el" href="namespacelog4cxx.html#a59eb1cd441fdcbcc0f5479ec03f962ea">LoggerPtr</a> &amp;cat, const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;loggerName)</td></tr>
<tr class="memdesc:a7eed707b30677da6cc17f97e8354dd94"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse the additivity option for a non-root logger. <a href="#a7eed707b30677da6cc17f97e8354dd94">More...</a><br /></td></tr>
<tr class="separator:a7eed707b30677da6cc17f97e8354dd94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5584f913bf83f8914a69f0988d3927ef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#a5584f913bf83f8914a69f0988d3927ef">parseLogger</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">helpers::Properties</a> &amp;props, <a class="el" href="namespacelog4cxx.html#a59eb1cd441fdcbcc0f5479ec03f962ea">LoggerPtr</a> &amp;logger, const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;optionKey, const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;loggerName, const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;value)</td></tr>
<tr class="memdesc:a5584f913bf83f8914a69f0988d3927ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method must work for the root logger as well. <a href="#a5584f913bf83f8914a69f0988d3927ef">More...</a><br /></td></tr>
<tr class="separator:a5584f913bf83f8914a69f0988d3927ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19046f080534a70994a247a2529df392"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacelog4cxx.html#a825abdb8af807ab3153132d863803029">AppenderPtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#a19046f080534a70994a247a2529df392">parseAppender</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">helpers::Properties</a> &amp;props, const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;appenderName)</td></tr>
<tr class="separator:a19046f080534a70994a247a2529df392"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49cd920f7af3bbb0818b5cda20532a2a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#a49cd920f7af3bbb0818b5cda20532a2a">registryPut</a> (const <a class="el" href="namespacelog4cxx.html#a825abdb8af807ab3153132d863803029">AppenderPtr</a> &amp;appender)</td></tr>
<tr class="separator:a49cd920f7af3bbb0818b5cda20532a2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a861aed2403a03730603533b25ce86c72"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacelog4cxx.html#a825abdb8af807ab3153132d863803029">AppenderPtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#a861aed2403a03730603533b25ce86c72">registryGet</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;name)</td></tr>
<tr class="separator:a861aed2403a03730603533b25ce86c72"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a57f23fd28fa072b9edf7f5a75aae5f71"><td class="memItemLeft" align="right" valign="top">std::map&lt; <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a>, <a class="el" href="namespacelog4cxx.html#a825abdb8af807ab3153132d863803029">AppenderPtr</a> &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#a57f23fd28fa072b9edf7f5a75aae5f71">registry</a></td></tr>
<tr class="memdesc:a57f23fd28fa072b9edf7f5a75aae5f71"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used internally to keep track of configured appenders. <a href="#a57f23fd28fa072b9edf7f5a75aae5f71">More...</a><br /></td></tr>
<tr class="separator:a57f23fd28fa072b9edf7f5a75aae5f71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66bd943561b32496fb646c0e89e76fd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">helpers::ObjectPtrT</a>&lt; <a class="el" href="classlog4cxx_1_1spi_1_1_logger_factory.html">spi::LoggerFactory</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_property_configurator.html#ae66bd943561b32496fb646c0e89e76fd">loggerFactory</a></td></tr>
<tr class="memdesc:ae66bd943561b32496fb646c0e89e76fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used to create new instances of logger. <a href="#ae66bd943561b32496fb646c0e89e76fd">More...</a><br /></td></tr>
<tr class="separator:ae66bd943561b32496fb646c0e89e76fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_classlog4cxx_1_1helpers_1_1_object_impl"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classlog4cxx_1_1helpers_1_1_object_impl')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classlog4cxx_1_1helpers_1_1_object_impl.html">ObjectImpl</a></td></tr>
<tr class="memitem:a88f2ae00c84f3f309965e6588ed158d4 inherit pro_attribs_classlog4cxx_1_1helpers_1_1_object_impl"><td class="memItemLeft" align="right" valign="top">unsigned int volatile&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_object_impl.html#a88f2ae00c84f3f309965e6588ed158d4">ref</a></td></tr>
<tr class="separator:a88f2ae00c84f3f309965e6588ed158d4 inherit pro_attribs_classlog4cxx_1_1helpers_1_1_object_impl"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Allows the configuration of <a class="el" href="namespacelog4cxx.html">log4cxx</a> from an external file. </p>
<p>See <b><a class="el" href="classlog4cxx_1_1_property_configurator.html#ad2a603ef30c78d771335bf3c83f39a6d">doConfigure(const File&amp;, log4cxx::spi::LoggerRepositoryPtr&amp;)</a></b> for the expected format.</p>
<p>It is sometimes useful to see how <a class="el" href="namespacelog4cxx.html">log4cxx</a> is reading configuration files. You can enable <a class="el" href="namespacelog4cxx.html">log4cxx</a> internal logging by defining the <b>log4j.debug</b> variable.</p>
<p>At class initialization time class, the file <b>log4j.properties</b> will be searched in the current directory. If the file can be found, then it will be fed to the <a class="el" href="classlog4cxx_1_1_property_configurator.html#a066eacbc35934b8a1670c58cd952f292">PropertyConfigurator#configure(const File&amp; configFilename)</a> method.</p>
<p>The <code><a class="el" href="classlog4cxx_1_1_property_configurator.html" title="Allows the configuration of log4cxx from an external file. ">PropertyConfigurator</a></code> does not handle the advanced configuration features supported by the <a class="el" href="classlog4cxx_1_1xml_1_1_d_o_m_configurator.html">DOMConfigurator</a> such as support for <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html">Filters</a>, custom <a class="el" href="classlog4cxx_1_1spi_1_1_error_handler.html">ErrorHandlers</a>, nested appenders such as the <a class="el" href="classlog4cxx_1_1_async_appender.html">AsyncAppender</a>, etc.</p>
<p>All option <em>values</em> admit variable substitution. The syntax of variable substitution is similar to that of Unix shells. The string between an opening <b>&quot;${&quot;</b> and closing <b>&quot;}&quot;</b> is interpreted as a key. The value of the substituted variable can be defined as a system property or in the configuration file itself. The value of the key is first searched in the system properties, and if not found there, it is then searched in the configuration file being parsed. The corresponding value replaces the ${variableName} sequence. For example, if <code>java.home</code> system property is set to <code>/home/xyz</code>, then every occurrence of the sequence <code>${java.home}</code> will be interpreted as <code>/home/xyz</code>. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a5c45e80fd7fc7a76ec62476f22ea67f8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classlog4cxx_1_1_property_configurator.html">PropertyConfigurator</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a8dae246571f1f0c945268b544788cac5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual ~<a class="el" href="classlog4cxx_1_1_property_configurator.html">PropertyConfigurator</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a0198815940c2715c84b0e04828cf8dfa"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void addRef </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Reimplemented from <a class="el" href="classlog4cxx_1_1helpers_1_1_object_impl.html#a0198815940c2715c84b0e04828cf8dfa">ObjectImpl</a>.</p>
</div>
</div>
<a class="anchor" id="a066eacbc35934b8a1670c58cd952f292"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void configure </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classlog4cxx_1_1_file.html">File</a> &amp;&#160;</td>
<td class="paramname"><em>configFilename</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Read configuration options from file <code>configFilename</code>. </p>
</div>
</div>
<a class="anchor" id="a4654a3965e208a5ef577ccd6abb6b766"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void configure </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">helpers::Properties</a> &amp;&#160;</td>
<td class="paramname"><em>properties</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Read configuration options from <code>properties</code>. </p>
<p>See <a class="el" href="classlog4cxx_1_1_property_configurator.html#ad2a603ef30c78d771335bf3c83f39a6d" title="Read configuration from a file. ">doConfigure(const File&amp;, log4cxx::spi::LoggerRepositoryPtr&amp;)</a> for the expected format. </p>
</div>
</div>
<a class="anchor" id="a517ec9e73d2d8db063e40fd13b7f0568"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void configureAndWatch </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classlog4cxx_1_1_file.html">File</a> &amp;&#160;</td>
<td class="paramname"><em>configFilename</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Like <a class="el" href="classlog4cxx_1_1_property_configurator.html#a2b3a06f3c9c4224ce1b9ec22011f53d2">configureAndWatch(const File&amp; configFilename, long delay)</a> except that the default delay as defined by <a class="el" href="classlog4cxx_1_1helpers_1_1_file_watchdog.html#a339ae144d23b36d09a21da4767206ea3" title="The default delay between every file modification check, set to 60 seconds. ">helpers::FileWatchdog::DEFAULT_DELAY</a> is used. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">configFilename</td><td>A file in key=value format. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a2b3a06f3c9c4224ce1b9ec22011f53d2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void configureAndWatch </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classlog4cxx_1_1_file.html">File</a> &amp;&#160;</td>
<td class="paramname"><em>configFilename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">long&#160;</td>
<td class="paramname"><em>delay</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Read the configuration file <code>configFilename</code> if it exists. </p>
<p>Moreover, a thread will be created that will periodically check if <code>configFilename</code> has been created or modified. The period is determined by the <code>delay</code> argument. If a change or file creation is detected, then <code>configFilename</code> is read to configure log4j.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">configFilename</td><td>A file in key=value format. </td></tr>
<tr><td class="paramname">delay</td><td>The delay in milliseconds to wait between each check. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a2b4afba248929ab745252ff4975c319c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void configureLoggerFactory </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">helpers::Properties</a> &amp;&#160;</td>
<td class="paramname"><em>props</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Check the provided <code>Properties</code> object for a <a class="el" href="classlog4cxx_1_1_property_configurator.html#ae66bd943561b32496fb646c0e89e76fd" title="Used to create new instances of logger. ">loggerFactory</a> entry specified by LOGGER_FACTORY_KEY. </p>
<p>If such an entry exists, an attempt is made to create an instance using the default constructor. This instance is used for subsequent <a class="el" href="classlog4cxx_1_1_logger.html" title="This is the central class in the log4cxx package. ">Logger</a> creations within this configurator. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classlog4cxx_1_1_property_configurator.html#a0309d5be5c7abc1413185db3f58d71fc" title="Parse non-root elements, such non-root categories and renderers. ">parseCatsAndRenderers</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a5d6488d56bc6b2f860e6082394327f6e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void configureRootLogger </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">helpers::Properties</a> &amp;&#160;</td>
<td class="paramname"><em>props</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacelog4cxx_1_1spi.html#a7a69119f966029685ef737ca2d3ce0f0">spi::LoggerRepositoryPtr</a> &amp;&#160;</td>
<td class="paramname"><em>hierarchy</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="ad2a603ef30c78d771335bf3c83f39a6d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void doConfigure </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classlog4cxx_1_1_file.html">File</a> &amp;&#160;</td>
<td class="paramname"><em>configFileName</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacelog4cxx_1_1spi.html#a7a69119f966029685ef737ca2d3ce0f0">spi::LoggerRepositoryPtr</a> &amp;&#160;</td>
<td class="paramname"><em>hierarchy</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Read configuration from a file. </p>
<p><b>The existing configuration is not cleared nor reset.</b> If you require a different behavior, then call <a class="el" href="classlog4cxx_1_1_log_manager.html#a5ea603fb2ec6652d788fa259d35f146e">resetConfiguration</a> method before calling <code>doConfigure</code>.</p>
<p>The configuration file consists of statements in the format <code>key=value</code>. The syntax of different configuration elements are discussed below.</p>
<h3>Repository-wide threshold</h3>
<p>The repository-wide threshold filters logging requests by level regardless of logger. The syntax is:</p>
<pre>
log4j.threshold=[level]
</pre><p>The level value can consist of the string values OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL or a <em>custom level</em> value. A custom level value can be specified in the form level::classname. By default the repository-wide threshold is set to the lowest possible value, namely the level <code>ALL</code>. </p>
<h3><a class="el" href="classlog4cxx_1_1_appender.html" title="Implement this interface for your own strategies for outputting log statements. ">Appender</a> configuration</h3>
<p><a class="el" href="classlog4cxx_1_1_appender.html" title="Implement this interface for your own strategies for outputting log statements. ">Appender</a> configuration syntax is: </p><pre>
# For appender named <em>appenderName</em>, set its class.
# Note: The appender name can contain dots.
log4j.appender.appenderName=fully.qualified.name.of.appender.class</pre><pre># Set appender specific options.
log4j.appender.appenderName.option1=value1
...
log4j.appender.appenderName.optionN=valueN
</pre><p>For each named appender you can configure its <a class="el" href="classlog4cxx_1_1_layout.html">Layout</a>. The syntax for configuring an appender's layout is: </p><pre>
log4j.appender.appenderName.layout=fully.qualified.name.of.layout.class
log4j.appender.appenderName.layout.option1=value1
....
log4j.appender.appenderName.layout.optionN=valueN
</pre><h3>Configuring loggers</h3>
<p>The syntax for configuring the root logger is: </p><pre>
log4j.rootLogger=[level], appenderName, appenderName, ...
</pre><p>This syntax means that an optional <em>level</em> can be supplied followed by appender names separated by commas.</p>
<p>The level value can consist of the string values OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL or a <em>custom level</em> value. A custom level value can be specified in the form <code>level::classname</code>.</p>
<p>If a level value is specified, then the root level is set to the corresponding level. If no level value is specified, then the root level remains untouched.</p>
<p>The root logger can be assigned multiple appenders.</p>
<p>Each <em>appenderName</em> (separated by commas) will be added to the root logger. The named appender is defined using the appender syntax defined above.</p>
<p>For non-root categories the syntax is almost the same: </p><pre>
log4j.logger.logger_name=[level|INHERITED|NULL], appenderName, appenderName,
...
</pre><p>The meaning of the optional level value is discussed above in relation to the root logger. In addition however, the value INHERITED can be specified meaning that the named logger should inherit its level from the logger hierarchy.</p>
<p>If no level value is supplied, then the level of the named logger remains untouched.</p>
<p>By default categories inherit their level from the hierarchy. However, if you set the level of a logger and later decide that that logger should inherit its level, then you should specify INHERITED as the value for the level value. NULL is a synonym for INHERITED.</p>
<p>Similar to the root logger syntax, each <em>appenderName</em> (separated by commas) will be attached to the named logger.</p>
<p>See the <a href="Introduction.html#additivity">appender additivity rule</a> in the user manual for the meaning of the <code>additivity</code> flag.</p>
<h3><a class="el" href="classlog4cxx_1_1_logger.html" title="This is the central class in the log4cxx package. ">Logger</a> Factories</h3>
<p>The usage of custom logger factories is discouraged and no longer documented.</p>
<h3>Example</h3>
<p>An example configuration is given below. Other configuration file examples are given in the <code>examples</code> folder.</p>
<pre></pre><pre># Set options for appender named "A1".
# <a class="el" href="classlog4cxx_1_1_appender.html" title="Implement this interface for your own strategies for outputting log statements. ">Appender</a> "A1" will be a SyslogAppender
log4j.appender.A1=SyslogAppender</pre><pre># The syslog daemon resides on www.abc.net
log4j.appender.A1.SyslogHost=www.abc.net</pre><pre># A1's layout is a <a class="el" href="classlog4cxx_1_1_pattern_layout.html" title="A flexible layout configurable with pattern string. ">PatternLayout</a>, using the conversion pattern
# <b>r %-5p c{2} M.L x - m<br />
</b>. Thus, the log output will
# include # the relative time since the start of the application in
# milliseconds, followed by the level of the log request,
# followed by the two rightmost components of the logger name,
# followed by the callers method name, followed by the line number,
# the nested disgnostic context and finally the message itself.
# Refer to the documentation of <a class="el" href="classlog4cxx_1_1_pattern_layout.html" title="A flexible layout configurable with pattern string. ">PatternLayout</a> for further information
# on the syntax of the ConversionPattern key.
log4j.appender.A1.layout=<a class="el" href="classlog4cxx_1_1_pattern_layout.html" title="A flexible layout configurable with pattern string. ">PatternLayout</a>
log4j.appender.A1.layout.ConversionPattern=%-4r %-5p c{2} M.L x - m<br />
# Set options for appender named "A2"
# A2 should be a <a class="el" href="classlog4cxx_1_1_rolling_file_appender.html" title="RollingFileAppender extends FileAppender to backup the log files when they reach a certain size...">RollingFileAppender</a>, with maximum file size of 10 MB
# using at most one backup file. A2's layout is TTCC, using the
# ISO8061 date format with context printing enabled.
log4j.appender.A2=<a class="el" href="classlog4cxx_1_1_rolling_file_appender.html" title="RollingFileAppender extends FileAppender to backup the log files when they reach a certain size...">RollingFileAppender</a>
log4j.appender.A2.MaxFileSize=10MB
log4j.appender.A2.MaxBackupIndex=1
log4j.appender.A2.layout=<a class="el" href="classlog4cxx_1_1_t_t_c_c_layout.html" title="TTCC layout format consists of time, thread, logger name and nested diagnostic context information...">TTCCLayout</a>
log4j.appender.A2.layout.ContextPrinting=enabled
log4j.appender.A2.layout.DateFormat=ISO8601</pre><pre># Root logger set to DEBUG using the A2 appender defined above.
log4j.rootLogger=DEBUG, A2</pre><pre># <a class="el" href="classlog4cxx_1_1_logger.html" title="This is the central class in the log4cxx package. ">Logger</a> definitions:
# The SECURITY logger inherits is level from root. However, it's output
# will go to A1 appender defined above. It's additivity is non-cumulative.
log4j.logger.SECURITY=INHERIT, A1
log4j.additivity.SECURITY=false</pre><pre># Only warnings or above will be logged for the logger "SECURITY.access".
# Output will go to A1.
log4j.logger.SECURITY.access=WARN</pre><pre># The logger "class.of.the.day" inherits its level from the
# logger hierarchy. Output will go to the appender's of the root
# logger, A2 in this case.
log4j.logger.class.of.the.day=INHERIT
</pre><p>Refer to the <b>setOption</b> method in each <a class="el" href="classlog4cxx_1_1_appender.html" title="Implement this interface for your own strategies for outputting log statements. ">Appender</a> and <a class="el" href="classlog4cxx_1_1_layout.html" title="Extend this abstract class to create your own log layout format. ">Layout</a> for class specific options.</p>
<p>Use the <code>#</code> or <code>!</code> characters at the beginning of a line for comments.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">configFileName</td><td>The name of the configuration file where the configuration information is stored. </td></tr>
<tr><td class="paramname">hierarchy</td><td>The hierarchy to operation upon. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="classlog4cxx_1_1spi_1_1_configurator.html#a5a874aab51a05508fda2cd7ae8e46465">Configurator</a>.</p>
</div>
</div>
<a class="anchor" id="ab561ed5fe9e6be0742817cc261f5a5d9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void doConfigure </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">helpers::Properties</a> &amp;&#160;</td>
<td class="paramname"><em>properties</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacelog4cxx_1_1spi.html#a7a69119f966029685ef737ca2d3ce0f0">spi::LoggerRepositoryPtr</a> &amp;&#160;</td>
<td class="paramname"><em>hierarchy</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Read configuration options from <code>properties</code>. </p>
<p>See <a class="el" href="classlog4cxx_1_1_property_configurator.html#ad2a603ef30c78d771335bf3c83f39a6d" title="Read configuration from a file. ">doConfigure(const File&amp;, log4cxx::spi::LoggerRepositoryPtr&amp;)</a> for the expected format. </p>
</div>
</div>
<a class="anchor" id="a7eed707b30677da6cc17f97e8354dd94"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void parseAdditivityForLogger </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">helpers::Properties</a> &amp;&#160;</td>
<td class="paramname"><em>props</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacelog4cxx.html#a59eb1cd441fdcbcc0f5479ec03f962ea">LoggerPtr</a> &amp;&#160;</td>
<td class="paramname"><em>cat</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
<td class="paramname"><em>loggerName</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Parse the additivity option for a non-root logger. </p>
</div>
</div>
<a class="anchor" id="a19046f080534a70994a247a2529df392"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespacelog4cxx.html#a825abdb8af807ab3153132d863803029">AppenderPtr</a> parseAppender </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">helpers::Properties</a> &amp;&#160;</td>
<td class="paramname"><em>props</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
<td class="paramname"><em>appenderName</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a0309d5be5c7abc1413185db3f58d71fc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void parseCatsAndRenderers </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">helpers::Properties</a> &amp;&#160;</td>
<td class="paramname"><em>props</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacelog4cxx_1_1spi.html#a7a69119f966029685ef737ca2d3ce0f0">spi::LoggerRepositoryPtr</a> &amp;&#160;</td>
<td class="paramname"><em>hierarchy</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Parse non-root elements, such non-root categories and renderers. </p>
</div>
</div>
<a class="anchor" id="a5584f913bf83f8914a69f0988d3927ef"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void parseLogger </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">helpers::Properties</a> &amp;&#160;</td>
<td class="paramname"><em>props</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacelog4cxx.html#a59eb1cd441fdcbcc0f5479ec03f962ea">LoggerPtr</a> &amp;&#160;</td>
<td class="paramname"><em>logger</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
<td class="paramname"><em>optionKey</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
<td class="paramname"><em>loggerName</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
<td class="paramname"><em>value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This method must work for the root logger as well. </p>
</div>
</div>
<a class="anchor" id="a861aed2403a03730603533b25ce86c72"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespacelog4cxx.html#a825abdb8af807ab3153132d863803029">AppenderPtr</a> registryGet </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
<td class="paramname"><em>name</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a49cd920f7af3bbb0818b5cda20532a2a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void registryPut </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="namespacelog4cxx.html#a825abdb8af807ab3153132d863803029">AppenderPtr</a> &amp;&#160;</td>
<td class="paramname"><em>appender</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a55c31efee1904916b999395fa4d46a24"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void releaseRef </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Reimplemented from <a class="el" href="classlog4cxx_1_1helpers_1_1_object_impl.html#a55c31efee1904916b999395fa4d46a24">ObjectImpl</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="ae66bd943561b32496fb646c0e89e76fd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">helpers::ObjectPtrT</a>&lt;<a class="el" href="classlog4cxx_1_1spi_1_1_logger_factory.html">spi::LoggerFactory</a>&gt; loggerFactory</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Used to create new instances of logger. </p>
</div>
</div>
<a class="anchor" id="a57f23fd28fa072b9edf7f5a75aae5f71"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::map&lt;<a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a>, <a class="el" href="namespacelog4cxx.html#a825abdb8af807ab3153132d863803029">AppenderPtr</a>&gt;* registry</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Used internally to keep track of configured appenders. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="propertyconfigurator_8h.html">propertyconfigurator.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!--
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.
-->
</body>
</html>