blob: e75689e11f2ec3d073d8c76dfa1382dec361fff1 [file] [log] [blame]
<?xml version="1.0" encoding="iso-8859-1"?>
<!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>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class LoggerHierarchy</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<script src="../media/lib/classTree.js"></script>
<script language="javascript" type="text/javascript">
var imgPlus = new Image();
var imgMinus = new Image();
imgPlus.src = "../media/images/plus.png";
imgMinus.src = "../media/images/minus.png";
function showNode(Node){
switch(navigator.family){
case 'nn4':
// Nav 4.x code fork...
var oTable = document.layers["span" + Node];
var oImg = document.layers["img" + Node];
break;
case 'ie4':
// IE 4/5 code fork...
var oTable = document.all["span" + Node];
var oImg = document.all["img" + Node];
break;
case 'gecko':
// Standards Compliant code fork...
var oTable = document.getElementById("span" + Node);
var oImg = document.getElementById("img" + Node);
break;
}
oImg.src = imgMinus.src;
oTable.style.display = "block";
}
function hideNode(Node){
switch(navigator.family){
case 'nn4':
// Nav 4.x code fork...
var oTable = document.layers["span" + Node];
var oImg = document.layers["img" + Node];
break;
case 'ie4':
// IE 4/5 code fork...
var oTable = document.all["span" + Node];
var oImg = document.all["img" + Node];
break;
case 'gecko':
// Standards Compliant code fork...
var oTable = document.getElementById("span" + Node);
var oImg = document.getElementById("img" + Node);
break;
}
oImg.src = imgPlus.src;
oTable.style.display = "none";
}
function nodeIsVisible(Node){
switch(navigator.family){
case 'nn4':
// Nav 4.x code fork...
var oTable = document.layers["span" + Node];
break;
case 'ie4':
// IE 4/5 code fork...
var oTable = document.all["span" + Node];
break;
case 'gecko':
// Standards Compliant code fork...
var oTable = document.getElementById("span" + Node);
break;
}
return (oTable && oTable.style.display == "block");
}
function toggleNodeVisibility(Node){
if (nodeIsVisible(Node)){
hideNode(Node);
}else{
showNode(Node);
}
}
</script>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class LoggerHierarchy</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This class is specialized in retrieving loggers by name and also maintaining the logger hierarchy. The logger hierarchy is dealing with the several Log-Levels Logger can have. From log4j website:</p>
<p class="description"><p>&quot;A logger is said to be an ancestor of another logger if its name followed by a dot is a prefix of the descendant logger name. A logger is said to be a parent of a child logger if there are no ancestors between itself and the descendant logger.&quot;</p><p>Child Loggers do inherit their Log-Levels from their Ancestors. They can increase their Log-Level compared to their Ancestors, but they cannot decrease it.</p><p>&lt;p&gt;The casual user does not have to deal with this class directly.&lt;/p&gt;</p><p>&lt;p&gt;The structure of the logger hierarchy is maintained by the getLogger method. The hierarchy is such that children link to their parent but parents do not have any pointers to their children. Moreover, loggers can be instantiated in any order, in particular descendant before ancestor.&lt;/p&gt;</p><p>&lt;p&gt;In case a descendant is created before a particular ancestor, then it creates a provision node for the ancestor and adds itself to the provision node. Other descendants of the same ancestor add themselves to the previously created provision node.&lt;/p&gt;</p></p>
<ul class="tags">
<li><span class="field">version:</span> $Revision: 1163124 $</li>
</ul>
<p class="notes">
Located in <a class="field" href="_LoggerHierarchy.php.html">/LoggerHierarchy.php</a> (line <span class="field">50</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-var-summary"></a>
<div class="info-box">
<div class="info-box-title">Variable Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="var-summary">
<div class="var-title">
<span class="var-type">mixed</span>
<a href="#$loggers" title="details" class="var-name">$loggers</a>
</div>
<div class="var-title">
<span class="var-type"><a href="../log4php/renderers/LoggerRendererMap.html">LoggerRendererMap</a></span>
<a href="#$rendererMap" title="details" class="var-name">$rendererMap</a>
</div>
<div class="var-title">
<span class="var-type">RootLogger</span>
<a href="#$root" title="details" class="var-name">$root</a>
</div>
<div class="var-title">
<span class="var-type"><a href="../log4php/LoggerLevel.html">LoggerLevel</a></span>
<a href="#$threshold" title="details" class="var-name">$threshold</a>
</div>
</div>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">LoggerHierarchy</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
(<span class="var-type"><a href="../log4php/LoggerRoot.html">LoggerRoot</a></span>&nbsp;<span class="var-name">$root</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#clear" title="details" class="method-name">clear</a>
()
</div>
<div class="method-definition">
<span class="method-result">boolean</span>
<a href="#exists" title="details" class="method-name">exists</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#getCurrentLoggers" title="details" class="method-name">getCurrentLoggers</a>
()
</div>
<div class="method-definition">
<span class="method-result"><a href="../log4php/Logger.html">Logger</a></span>
<a href="#getLogger" title="details" class="method-name">getLogger</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
</div>
<div class="method-definition">
<span class="method-result"><a href="../log4php/renderers/LoggerRendererMap.html">LoggerRendererMap</a></span>
<a href="#getRendererMap" title="details" class="method-name">getRendererMap</a>
()
</div>
<div class="method-definition">
<span class="method-result"><a href="../log4php/LoggerRoot.html">LoggerRoot</a></span>
<a href="#getRootLogger" title="details" class="method-name">getRootLogger</a>
()
</div>
<div class="method-definition">
<span class="method-result"><a href="../log4php/LoggerLevel.html">LoggerLevel</a></span>
<a href="#getThreshold" title="details" class="method-name">getThreshold</a>
()
</div>
<div class="method-definition">
<span class="method-result">boolean</span>
<a href="#isDisabled" title="details" class="method-name">isDisabled</a>
(<span class="var-type"><a href="../log4php/LoggerLevel.html">LoggerLevel</a></span>&nbsp;<span class="var-name">$level</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#resetConfiguration" title="details" class="method-name">resetConfiguration</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#setThreshold" title="details" class="method-name">setThreshold</a>
(<span class="var-type"><a href="../log4php/LoggerLevel.html">LoggerLevel</a></span>&nbsp;<span class="var-name">$threshold</span>, <span class="var-type"><a href="../log4php/LoggerLevel.html">LoggerLevel</a></span>&nbsp;<span class="var-name">$l</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#shutdown" title="details" class="method-name">shutdown</a>
()
</div>
</div>
</div>
</div>
<a name="sec-vars"></a>
<div class="info-box">
<div class="info-box-title">Variables</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<a name="var$loggers" id="$loggers"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">mixed</span>
<span class="var-name">$loggers</span>
= <span class="var-default">array()</span> (line <span class="line-number">53</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Array holding all Logger instances.</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$rendererMap" id="$rendererMap"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type"><a href="../log4php/renderers/LoggerRendererMap.html">LoggerRendererMap</a></span>
<span class="var-name">$rendererMap</span>
(line <span class="line-number">65</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The logger renderer map.</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$root" id="$root"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">RootLogger</span>
<span class="var-name">$root</span>
= <span class="var-default"> null</span> (line <span class="line-number">59</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The root logger.</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$threshold" id="$threshold"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type"><a href="../log4php/LoggerLevel.html">LoggerLevel</a></span>
<span class="var-name">$threshold</span>
(line <span class="line-number">72</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Main level threshold. Events with lower level will not be logged by any logger, regardless of it's configuration.</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">Constructor __construct</span> (line <span class="line-number">78</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Creates a new logger hierarchy.</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">LoggerHierarchy</span>
<span class="method-name">
__construct
</span>
(<span class="var-type"><a href="../log4php/LoggerRoot.html">LoggerRoot</a></span>&nbsp;<span class="var-name">$root</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type"><a href="../log4php/LoggerRoot.html">LoggerRoot</a></span>
<span class="var-name">$root</span><span class="var-description">: The root logger.</span> </li>
</ul>
</div>
<a name="methodclear" id="clear"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">clear</span> (line <span class="line-number">87</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Clears all loggers.</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
clear
</span>
()
</div>
</div>
<a name="methodexists" id="exists"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">exists</span> (line <span class="line-number">96</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Check if the named logger exists in the hierarchy.</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">boolean</span>
<span class="method-name">
exists
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$name</span> </li>
</ul>
</div>
<a name="methodgetCurrentLoggers" id="getCurrentLoggers"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getCurrentLoggers</span> (line <span class="line-number">104</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns all the currently defined loggers in this hierarchy as an array.</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
getCurrentLoggers
</span>
()
</div>
</div>
<a name="methodgetLogger" id="getLogger"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getLogger</span> (line <span class="line-number">114</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns a named logger instance logger. If it doesn't exist, one is created.</p>
<ul class="tags">
<li><span class="field">return:</span> Logger instance.</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result"><a href="../log4php/Logger.html">Logger</a></span>
<span class="method-name">
getLogger
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$name</span><span class="var-description">: Logger name</span> </li>
</ul>
</div>
<a name="methodgetRendererMap" id="getRendererMap"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getRendererMap</span> (line <span class="line-number">151</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the logger renderer map.</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result"><a href="../log4php/renderers/LoggerRendererMap.html">LoggerRendererMap</a></span>
<span class="method-name">
getRendererMap
</span>
()
</div>
</div>
<a name="methodgetRootLogger" id="getRootLogger"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getRootLogger</span> (line <span class="line-number">159</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the root logger.</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result"><a href="../log4php/LoggerRoot.html">LoggerRoot</a></span>
<span class="method-name">
getRootLogger
</span>
()
</div>
</div>
<a name="methodgetThreshold" id="getThreshold"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getThreshold</span> (line <span class="line-number">170</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the main threshold level.</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result"><a href="../log4php/LoggerLevel.html">LoggerLevel</a></span>
<span class="method-name">
getThreshold
</span>
()
</div>
</div>
<a name="methodisDisabled" id="isDisabled"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">isDisabled</span> (line <span class="line-number">179</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns true if the hierarchy is disabled for given log level and false otherwise.</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">boolean</span>
<span class="method-name">
isDisabled
</span>
(<span class="var-type"><a href="../log4php/LoggerLevel.html">LoggerLevel</a></span>&nbsp;<span class="var-name">$level</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type"><a href="../log4php/LoggerLevel.html">LoggerLevel</a></span>
<span class="var-name">$level</span> </li>
</ul>
</div>
<a name="methodresetConfiguration" id="resetConfiguration"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">resetConfiguration</span> (line <span class="line-number">197</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Reset all values contained in this hierarchy instance to their default.</p>
<p class="description"><p>This removes all appenders from all loggers, sets the level of all non-root loggers to <em>null</em>, sets their additivity flag to <em>true</em> and sets the level of the root logger to LOGGER_LEVEL_DEBUG.</p><p>&lt;p&gt;Existing loggers are not removed. They are just reset.</p><p>&lt;p&gt;This method should be used sparingly and with care as it will block all logging until it is completed.&lt;/p&gt;</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
resetConfiguration
</span>
()
</div>
</div>
<a name="methodsetThreshold" id="setThreshold"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">setThreshold</span> (line <span class="line-number">218</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets the main threshold level.</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
setThreshold
</span>
(<span class="var-type"><a href="../log4php/LoggerLevel.html">LoggerLevel</a></span>&nbsp;<span class="var-name">$threshold</span>, <span class="var-type"><a href="../log4php/LoggerLevel.html">LoggerLevel</a></span>&nbsp;<span class="var-name">$l</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type"><a href="../log4php/LoggerLevel.html">LoggerLevel</a></span>
<span class="var-name">$l</span> </li>
<li>
<span class="var-type"><a href="../log4php/LoggerLevel.html">LoggerLevel</a></span>
<span class="var-name">$threshold</span> </li>
</ul>
</div>
<a name="methodshutdown" id="shutdown"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">shutdown</span> (line <span class="line-number">233</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Shutting down a hierarchy will <em>safely</em> close and remove all appenders in all loggers including the root logger.</p>
<p class="description"><p>The shutdown method is careful to close nested appenders before closing regular appenders. This is allows configurations where a regular appender is attached to a logger and again to a nested appender.</p></p>
<ul class="tags">
<li><span class="field">todo:</span> Check if the last paragraph is correct.</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
shutdown
</span>
()
</div>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Sat, 18 Feb 2012 22:32:24 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
</p>
</div></body>
</html>