blob: df3ca42ecd5ce1507302fa95d7f7ea8f8815969e [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 LoggerLayoutHtml</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 LoggerLayoutHtml</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 layout outputs events in a HTML table.</p>
<p class="description"><p>Configurable parameters for this layout are:</p><p><ul><li>title</li><li>locationInfo</li></ul> An example for this layout:</p><p><div class="src-code"><ol><li><div class="src-line"><span class="src-inc">require_once&nbsp;</span><span class="src-id">dirname</span><span class="src-sym">(</span>__FILE__<span class="src-sym">)</span>.<span class="src-str">'/../../main/php/Logger.php'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line"><span class="src-id"><a href="../../log4php/Logger.html">Logger</a></span><span class="src-sym">::</span><a href="../../log4php/Logger.html#methodconfigure">configure</a><span class="src-sym">(</span><a href="http://www.php.net/dirname">dirname</a><span class="src-sym">(</span>__FILE__<span class="src-sym">)</span>.<span class="src-str">'/../resources/layout_html.properties'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><span class="src-var">$logger&nbsp;</span>=&nbsp;<span class="src-id"><a href="../../log4php/Logger.html">Logger</a></span><span class="src-sym">::</span><a href="../../log4php/Logger.html#methodgetRootLogger">getRootLogger</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><span class="src-var">$logger</span><span class="src-sym">-&gt;</span><span class="src-id">info</span><span class="src-sym">(</span><span class="src-str">&quot;Hello&nbsp;World!&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div><br /></p><p>The corresponding XML file:</p><p><div class="src-code"><ol><li><div class="src-line">log4php.appender.default&nbsp;=&nbsp;LoggerAppenderEcho</div></li>
<li><div class="src-line">log4php.appender.default.layout&nbsp;=&nbsp;LoggerLayoutHtml</div></li>
<li><div class="src-line">log4php.rootLogger&nbsp;=&nbsp;DEBUG,&nbsp;default</div></li>
</ol></div></p><p>The above will print a HTML table that looks, converted back to plain text, like the following:<br /> <pre> Log session start time Wed Sep 9 00:11:30 2009
Time Thread Level Category Message
0 8318 INFO root Hello World!</pre></p></p>
<ul class="tags">
<li><span class="field">version:</span> $Revision: 1213283 $</li>
</ul>
<p class="notes">
Located in <a class="field" href="_layouts---LoggerLayoutHtml.php.html">/layouts/LoggerLayoutHtml.php</a> (line <span class="field">49</span>)
</p>
<pre><a href="../../log4php/LoggerConfigurable.html">LoggerConfigurable</a>
|
--<a href="../../log4php/LoggerLayout.html">LoggerLayout</a>
|
--LoggerLayoutHtml</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">boolean</span>
<a href="#$locationInfo" title="details" class="var-name">$locationInfo</a>
</div>
<div class="var-title">
<span class="var-type">string</span>
<a href="#$title" title="details" class="var-name">$title</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">string</span>
<a href="#format" title="details" class="method-name">format</a>
(<span class="var-type"><a href="../../log4php/LoggerLoggingEvent.html">LoggerLoggingEvent</a></span>&nbsp;<span class="var-name">$event</span>)
</div>
<div class="method-definition">
<span class="method-result">string</span>
<a href="#getContentType" title="details" class="method-name">getContentType</a>
()
</div>
<div class="method-definition">
<span class="method-result">string</span>
<a href="#getFooter" title="details" class="method-name">getFooter</a>
()
</div>
<div class="method-definition">
<span class="method-result">string</span>
<a href="#getHeader" title="details" class="method-name">getHeader</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#getLocationInfo" title="details" class="method-name">getLocationInfo</a>
()
</div>
<div class="method-definition">
<span class="method-result">string</span>
<a href="#getTitle" title="details" class="method-name">getTitle</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#setLocationInfo" title="details" class="method-name">setLocationInfo</a>
(<span class="var-type"></span>&nbsp;<span class="var-name">$flag</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#setTitle" title="details" class="method-name">setTitle</a>
(<span class="var-type"></span>&nbsp;<span class="var-name">$title</span>)
</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$locationInfo" id="$locationInfo"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">boolean</span>
<span class="var-name">$locationInfo</span>
= <span class="var-default"> false</span> (line <span class="line-number">62</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The <strong>LocationInfo</strong> option takes a boolean value. By</p>
<p class="description"><p>default, it is set to false which means there will be no location information output by this layout. If the the option is set to true, then the file name and line number of the statement at the origin of the log statement will be output.</p><p>&lt;p&gt;If you are embedding this layout within a <a href="../../log4php/appenders/LoggerAppenderMail.html">LoggerAppenderMail</a> or a <a href="../../log4php/appenders/LoggerAppenderMailEvent.html">LoggerAppenderMailEvent</a> then make sure to set the <strong>LocationInfo</strong> option of that appender as well.</p></p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$title" id="$title"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">string</span>
<span class="var-name">$title</span>
= <span class="var-default"> &quot;Log4php Log Messages&quot;</span> (line <span class="line-number">70</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The <strong>Title</strong> option takes a String value. This option sets the document title of the generated HTML document.</p>
<p class="description"><p>Defaults to 'Log4php Log Messages'.</p></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="methodformat" id="format"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">format</span> (line <span class="line-number">121</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">string</span>
<span class="method-name">
format
</span>
(<span class="var-type"><a href="../../log4php/LoggerLoggingEvent.html">LoggerLoggingEvent</a></span>&nbsp;<span class="var-name">$event</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type"><a href="../../log4php/LoggerLoggingEvent.html">LoggerLoggingEvent</a></span>
<span class="var-name">$event</span> </li>
</ul>
<hr class="separator" />
<div class="notes">Redefinition of:</div>
<dl>
<dt><a href="../../log4php/LoggerLayout.html#methodformat">LoggerLayout::format()</a></dt>
<dd>Override this method to create your own layout format.</dd>
</dl>
</div>
<a name="methodgetContentType" id="getContentType"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getContentType</span> (line <span class="line-number">113</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<ul class="tags">
<li><span class="field">return:</span> Returns the content type output by this layout, i.e &quot;text/html&quot;.</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">string</span>
<span class="method-name">
getContentType
</span>
()
</div>
<hr class="separator" />
<div class="notes">Redefinition of:</div>
<dl>
<dt><a href="../../log4php/LoggerLayout.html#methodgetContentType">LoggerLayout::getContentType()</a></dt>
<dd>Returns the content type output by this layout.</dd>
</dl>
</div>
<a name="methodgetFooter" id="getFooter"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getFooter</span> (line <span class="line-number">207</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<ul class="tags">
<li><span class="field">return:</span> Returns the appropriate HTML footers.</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">string</span>
<span class="method-name">
getFooter
</span>
()
</div>
<hr class="separator" />
<div class="notes">Redefinition of:</div>
<dl>
<dt><a href="../../log4php/LoggerLayout.html#methodgetFooter">LoggerLayout::getFooter()</a></dt>
<dd>Returns the footer for the layout format.</dd>
</dl>
</div>
<a name="methodgetHeader" id="getHeader"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getHeader</span> (line <span class="line-number">173</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<ul class="tags">
<li><span class="field">return:</span> Returns appropriate HTML headers.</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">string</span>
<span class="method-name">
getHeader
</span>
()
</div>
<hr class="separator" />
<div class="notes">Redefinition of:</div>
<dl>
<dt><a href="../../log4php/LoggerLayout.html#methodgetHeader">LoggerLayout::getHeader()</a></dt>
<dd>Returns the header for the layout format.</dd>
</dl>
</div>
<a name="methodgetLocationInfo" id="getLocationInfo"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getLocationInfo</span> (line <span class="line-number">90</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the current value of the <strong>LocationInfo</strong> option.</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">
getLocationInfo
</span>
()
</div>
</div>
<a name="methodgetTitle" id="getTitle"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getTitle</span> (line <span class="line-number">106</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<ul class="tags">
<li><span class="field">return:</span> Returns the current value of the <strong>Title</strong> option.</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">string</span>
<span class="method-name">
getTitle
</span>
()
</div>
</div>
<a name="methodsetLocationInfo" id="setLocationInfo"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">setLocationInfo</span> (line <span class="line-number">83</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The <strong>LocationInfo</strong> option takes a boolean value. By</p>
<p class="description"><p>default, it is set to false which means there will be no location information output by this layout. If the the option is set to true, then the file name and line number of the statement at the origin of the log statement will be output.</p><p>&lt;p&gt;If you are embedding this layout within a <a href="../../log4php/appenders/LoggerAppenderMail.html">LoggerAppenderMail</a> or a <a href="../../log4php/appenders/LoggerAppenderMailEvent.html">LoggerAppenderMailEvent</a> then make sure to set the <strong>LocationInfo</strong> option of that appender as well.</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">
setLocationInfo
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$flag</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type"></span>
<span class="var-name">$flag</span> </li>
</ul>
</div>
<a name="methodsetTitle" id="setTitle"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">setTitle</span> (line <span class="line-number">99</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The <strong>Title</strong> option takes a String value. This option sets the document title of the generated HTML document.</p>
<p class="description"><p>Defaults to 'Log4php Log Messages'.</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">
setTitle
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$title</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type"></span>
<span class="var-name">$title</span> </li>
</ul>
</div>
<h4>Inherited Methods</h4>
<a name='inherited_methods'><!-- --></a>
<!-- =========== Summary =========== -->
<p>Inherited From <span class="classname"><a href="../../log4php/LoggerLayout.html">LoggerLayout</a></span></p>
<blockquote>
<span class="method-name"><a href="../../log4php/LoggerLayout.html#methodactivateOptions">LoggerLayout::activateOptions()</a></span><br>
<span class="method-name"><a href="../../log4php/LoggerLayout.html#methodformat">LoggerLayout::format()</a></span><br>
<span class="method-name"><a href="../../log4php/LoggerLayout.html#methodgetContentType">LoggerLayout::getContentType()</a></span><br>
<span class="method-name"><a href="../../log4php/LoggerLayout.html#methodgetFooter">LoggerLayout::getFooter()</a></span><br>
<span class="method-name"><a href="../../log4php/LoggerLayout.html#methodgetHeader">LoggerLayout::getHeader()</a></span><br>
<span class="method-name"><a href="../../log4php/LoggerLayout.html#methodwarn">LoggerLayout::warn()</a></span><br>
</blockquote>
<!-- =========== Summary =========== -->
<p>Inherited From <span class="classname"><a href="../../log4php/LoggerConfigurable.html">LoggerConfigurable</a></span></p>
<blockquote>
<span class="method-name"><a href="../../log4php/LoggerConfigurable.html#methodsetBoolean">LoggerConfigurable::setBoolean()</a></span><br>
<span class="method-name"><a href="../../log4php/LoggerConfigurable.html#methodsetFileSize">LoggerConfigurable::setFileSize()</a></span><br>
<span class="method-name"><a href="../../log4php/LoggerConfigurable.html#methodsetInteger">LoggerConfigurable::setInteger()</a></span><br>
<span class="method-name"><a href="../../log4php/LoggerConfigurable.html#methodsetLevel">LoggerConfigurable::setLevel()</a></span><br>
<span class="method-name"><a href="../../log4php/LoggerConfigurable.html#methodsetNumeric">LoggerConfigurable::setNumeric()</a></span><br>
<span class="method-name"><a href="../../log4php/LoggerConfigurable.html#methodsetPositiveInteger">LoggerConfigurable::setPositiveInteger()</a></span><br>
<span class="method-name"><a href="../../log4php/LoggerConfigurable.html#methodsetString">LoggerConfigurable::setString()</a></span><br>
<span class="method-name"><a href="../../log4php/LoggerConfigurable.html#methodwarn">LoggerConfigurable::warn()</a></span><br>
</blockquote>
</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>