blob: 1e486704581c1cf356a1b12d76ff7111413397b2 [file] [log] [blame]
<html>
<head>
<title>
log4cxx - Documentation
</title>
<link href="../css/doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body bgcolor="#ffffff" text="#000000" link="#525D76">
<!-- START Header table -->
<table border="0" cellspacing="0" width="90%">
<!-- TOP IMAGE -->
<tr>
<td colspan="2">
<a href="http://logging.apache.org">
<img src="http://logging.apache.org/images/ls-logo.jpg" align="left" border="0"/>
</a>
</td>
</tr>
</table>
<!-- END Header table -->
<!-- START main table -->
<table id="main" border="0" width="90%" cellspacing="2" cellpadding="0">
<tr><td colspan="2">
<hr noshade="" size="1"/>
</td></tr>
<tr>
<!-- LEFT SIDE NAVIGATION -->
<td id="navbar" valign="top">
<!-- ============================================================ -->
<table id="navbar" border="0" cellspacing="0" cellpadding="0">
<tr >
<td class="navbarHeader" nowrap="true">
<strong>Apache</strong>
</td>
</tr>
<tr><td class="navbarItem"><small> <a href="http://www.apache.org">Apache Home</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="http://logging.apache.org/">Logging Services</a>
</small></td></tr>
<tr >
<td class="navbarHeader" nowrap="true">
<strong>log4cxx project</strong>
</td>
</tr>
<tr><td class="navbarItem"><small> <a href="../index.html">About</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../news.html">News</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../team.html">Team</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../manual/index.html">Documentation</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../performance.html">Performance</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../download.html">Download</a>
</small></td></tr>
</table>
</td>
<td id="mainContents" align="left" valign="top">
<hr>
<!-- Generated by Doxygen 1.3.5 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a></div>
<h1>Layout Class Reference</h1>Inheritance diagram for Layout:<p><center><img src="classlog4cxx_1_1Layout__inherit__graph.png" border="0" usemap="#Layout__inherit__map" alt="Inheritance graph"></center>
<map name="Layout__inherit__map">
<area href="classlog4cxx_1_1helpers_1_1DateLayout.html" shape="rect" coords="9,242,86,266" alt="">
<area href="classlog4cxx_1_1HTMLLayout.html" shape="rect" coords="110,242,193,266" alt="">
<area href="classlog4cxx_1_1PatternLayout.html" shape="rect" coords="217,242,308,266" alt="">
<area href="classlog4cxx_1_1SimpleLayout.html" shape="rect" coords="332,242,422,266" alt="">
<area href="classlog4cxx_1_1xml_1_1XMLLayout.html" shape="rect" coords="446,242,524,266" alt="">
<area href="classlog4cxx_1_1spi_1_1OptionHandler.html" shape="rect" coords="160,93,256,117" alt="">
<area href="classlog4cxx_1_1helpers_1_1Object.html" shape="rect" coords="237,18,288,42" alt="">
<area href="classlog4cxx_1_1helpers_1_1ObjectImpl.html" shape="rect" coords="280,93,354,117" alt="">
<area href="classlog4cxx_1_1TTCCLayout.html" shape="rect" coords="6,317,89,341" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for Layout:<p><center><img src="classlog4cxx_1_1Layout__coll__graph.png" border="0" usemap="#Layout__coll__map" alt="Collaboration graph"></center>
<map name="Layout__coll__map">
<area href="classlog4cxx_1_1spi_1_1OptionHandler.html" shape="rect" coords="6,93,102,117" alt="">
<area href="classlog4cxx_1_1helpers_1_1Object.html" shape="rect" coords="84,18,134,42" alt="">
<area href="classlog4cxx_1_1helpers_1_1ObjectImpl.html" shape="rect" coords="126,93,201,117" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classlog4cxx_1_1Layout-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1Layout.html#a1">format</a> (ostream &amp;output, const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">spi::LoggingEventPtr</a> &amp;event) const=0</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual String&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1Layout.html#a2">getContentType</a> () const </td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1Layout.html#a3">appendHeader</a> (ostream &amp;output)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1Layout.html#a4">appendFooter</a> (ostream &amp;output)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1Layout.html#a5">ignoresThrowable</a> () const=0</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Extend this abstract class to create your own log layout format.
<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a4" doxytag="log4cxx::Layout::appendFooter" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual void appendFooter </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">ostream &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>output</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Append the footer for the layout format. The base class does nothing.
<p>
Reimplemented in <a class="el" href="classlog4cxx_1_1HTMLLayout.html#a10">HTMLLayout</a>. </td>
</tr>
</table>
<a class="anchor" name="a3" doxytag="log4cxx::Layout::appendHeader" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual void appendHeader </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">ostream &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>output</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Append the header for the layout format. The base class does nothing.
<p>
Reimplemented in <a class="el" href="classlog4cxx_1_1HTMLLayout.html#a9">HTMLLayout</a>. </td>
</tr>
</table>
<a class="anchor" name="a1" doxytag="log4cxx::Layout::format" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual void format </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">ostream &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>output</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">spi::LoggingEventPtr</a> &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>event</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"> const<code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Implement this method to create your own layout format.
<p>
Implemented in <a class="el" href="classlog4cxx_1_1HTMLLayout.html#a8">HTMLLayout</a>, <a class="el" href="classlog4cxx_1_1PatternLayout.html#a7">PatternLayout</a>, <a class="el" href="classlog4cxx_1_1SimpleLayout.html#a0">SimpleLayout</a>, <a class="el" href="classlog4cxx_1_1TTCCLayout.html#a10">TTCCLayout</a>, and <a class="el" href="classlog4cxx_1_1xml_1_1XMLLayout.html#a5">XMLLayout</a>. </td>
</tr>
</table>
<a class="anchor" name="a2" doxytag="log4cxx::Layout::getContentType" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual String getContentType </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const<code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Returns the content type output by this layout. The base class returns "text/plain".
<p>
Reimplemented in <a class="el" href="classlog4cxx_1_1HTMLLayout.html#a5">HTMLLayout</a>. </td>
</tr>
</table>
<a class="anchor" name="a5" doxytag="log4cxx::Layout::ignoresThrowable" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual bool ignoresThrowable </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const<code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
If the layout handles the throwable object contained within <a class="el" href="classlog4cxx_1_1spi_1_1LoggingEvent.html">LoggingEvent</a>, then the layout should return <code>false</code>. Otherwise, if the layout ignores throwable object, then the layout should return <code>true</code>.<p>
The <a class="el" href="classlog4cxx_1_1SimpleLayout.html">SimpleLayout</a>, <a class="el" href="classlog4cxx_1_1TTCCLayout.html">TTCCLayout</a>, <a class="el" href="classlog4cxx_1_1PatternLayout.html">PatternLayout</a> all return <code>true</code>. The <a class="el" href="classlog4cxx_1_1xml_1_1XMLLayout.html">XMLLayout</a> returns <code>false</code>.
<p>
Implemented in <a class="el" href="classlog4cxx_1_1HTMLLayout.html#a11">HTMLLayout</a>, <a class="el" href="classlog4cxx_1_1PatternLayout.html#a6">PatternLayout</a>, <a class="el" href="classlog4cxx_1_1SimpleLayout.html#a1">SimpleLayout</a>, <a class="el" href="classlog4cxx_1_1TTCCLayout.html#a11">TTCCLayout</a>, and <a class="el" href="classlog4cxx_1_1xml_1_1XMLLayout.html#a6">XMLLayout</a>. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li>layout.h</ul>
</td>
</tr>
<!-- FOOTER -->
<tr><td colspan="2">
<hr noshade="" size="1"/>
</td></tr>
<tr><td colspan="2">
<div align="center"><font color="#525D76" size="-1"><em>
Copyright &#169; 1999-2004, Apache Software Foundation
</em></font></div>
</td></tr>
</table>
<!-- END main table -->
</body>
</html>
<!-- end the processing -->