blob: 848b275f7448a0e72bee735209b5010ac9da762d [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>FileAppender Class Reference</h1>Inheritance diagram for FileAppender:<p><center><img src="classlog4cxx_1_1FileAppender__inherit__graph.png" border="0" usemap="#FileAppender__inherit__map" alt="Inheritance graph"></center>
<map name="FileAppender__inherit__map">
<area href="classlog4cxx_1_1DailyRollingFileAppender.html" shape="rect" coords="7,433,172,451" alt="">
<area href="classlog4cxx_1_1RollingFileAppender.html" shape="rect" coords="196,433,332,451" alt="">
<area href="classlog4cxx_1_1WriterAppender.html" shape="rect" coords="123,294,229,313" alt="">
<area href="classlog4cxx_1_1AppenderSkeleton.html" shape="rect" coords="113,225,239,243" alt="">
<area href="classlog4cxx_1_1Appender.html" shape="rect" coords="89,155,164,174" alt="">
<area href="classlog4cxx_1_1spi_1_1OptionHandler.html" shape="rect" coords="84,86,183,105" alt="">
<area href="classlog4cxx_1_1helpers_1_1Object.html" shape="rect" coords="151,17,204,35" alt="">
<area href="classlog4cxx_1_1helpers_1_1ObjectImpl.html" shape="rect" coords="188,155,265,174" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for FileAppender:<p><center><img src="classlog4cxx_1_1FileAppender__coll__graph.png" border="0" usemap="#FileAppender__coll__map" alt="Collaboration graph"></center>
<map name="FileAppender__coll__map">
<area href="classlog4cxx_1_1WriterAppender.html" shape="rect" coords="80,401,187,419" alt="">
<area href="classlog4cxx_1_1AppenderSkeleton.html" shape="rect" coords="71,329,196,347" alt="">
<area href="classlog4cxx_1_1Appender.html" shape="rect" coords="21,179,96,198" alt="">
<area href="classlog4cxx_1_1spi_1_1OptionHandler.html" shape="rect" coords="7,89,105,107" alt="">
<area href="classlog4cxx_1_1helpers_1_1Object.html" shape="rect" coords="81,17,135,35" alt="">
<area href="classlog4cxx_1_1helpers_1_1ObjectImpl.html" shape="rect" coords="101,134,179,153" alt="">
<area href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html" shape="rect" coords="171,179,245,198" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classlog4cxx_1_1FileAppender-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>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#a0">FileAppender</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#a1">FileAppender</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">LayoutPtr</a> &amp;<a class="el" href="classlog4cxx_1_1AppenderSkeleton.html#p0">layout</a>, const String &amp;filename, bool append, bool <a class="el" href="classlog4cxx_1_1FileAppender.html#p2">bufferedIO</a>, int <a class="el" href="classlog4cxx_1_1FileAppender.html#p3">bufferSize</a>)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#a2">FileAppender</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">LayoutPtr</a> &amp;<a class="el" href="classlog4cxx_1_1AppenderSkeleton.html#p0">layout</a>, const String &amp;filename, bool append)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#a3">FileAppender</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">LayoutPtr</a> &amp;<a class="el" href="classlog4cxx_1_1AppenderSkeleton.html#p0">layout</a>, const String &amp;filename)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#a5">setFile</a> (const String &amp;file)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#a6">setFile</a> (const String &amp;file, bool append, bool <a class="el" href="classlog4cxx_1_1FileAppender.html#p2">bufferedIO</a>, int <a class="el" href="classlog4cxx_1_1FileAppender.html#p3">bufferSize</a>)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#a7">getAppend</a> () const </td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const String &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#a8">getFile</a> () const </td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#a9">activateOptions</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#a10">setOption</a> (const String &amp;option, const String &amp;value)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#a11">getBufferedIO</a> () const </td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#a12">getBufferSize</a> () const </td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#a13">setAppend</a> (bool <a class="el" href="classlog4cxx_1_1FileAppender.html#p0">fileAppend</a>)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#a14">setBufferedIO</a> (bool <a class="el" href="classlog4cxx_1_1FileAppender.html#p2">bufferedIO</a>)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#a15">setBufferSize</a> (int <a class="el" href="classlog4cxx_1_1FileAppender.html#p3">bufferSize</a>)</td></tr>
<tr><td colspan=2><br><h2>Protected 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_1FileAppender.html#b0">closeWriter</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#b1">closeFile</a> ()</td></tr>
<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#p0">fileAppend</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>String&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#p1">fileName</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#p2">bufferedIO</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1FileAppender.html#p3">bufferSize</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="classlog4cxx_1_1FileAppender.html">FileAppender</a> appends log events to a file.<p>
Support for <code>java.io.Writer</code> and console appending has been deprecated and then removed. See the replacement solutions: <a class="el" href="classlog4cxx_1_1WriterAppender.html">WriterAppender</a> and <a class="el" href="classlog4cxx_1_1ConsoleAppender.html">ConsoleAppender</a>.
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a0" doxytag="log4cxx::FileAppender::FileAppender" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classlog4cxx_1_1FileAppender.html">FileAppender</a> </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></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
The default constructor does not do anything. </td>
</tr>
</table>
<a class="anchor" name="a1" doxytag="log4cxx::FileAppender::FileAppender" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classlog4cxx_1_1FileAppender.html">FileAppender</a> </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">LayoutPtr</a> &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>layout</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const String &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>filename</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>bool&nbsp;</td>
<td class="mdname" nowrap> <em>append</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>bool&nbsp;</td>
<td class="mdname" nowrap> <em>bufferedIO</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int&nbsp;</td>
<td class="mdname" nowrap> <em>bufferSize</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Instantiate a <code><a class="el" href="classlog4cxx_1_1FileAppender.html">FileAppender</a></code> and open the file designated by <code>filename</code>. The opened filename will become the output destination for this appender.<p>
If the <code>append</code> parameter is true, the file will be appended to. Otherwise, the file designated by <code>filename</code> will be truncated before being opened.<p>
If the <code>bufferedIO</code> parameter is <code>true</code>, then buffered IO will be used to write to the output file. </td>
</tr>
</table>
<a class="anchor" name="a2" doxytag="log4cxx::FileAppender::FileAppender" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classlog4cxx_1_1FileAppender.html">FileAppender</a> </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">LayoutPtr</a> &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>layout</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const String &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>filename</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>bool&nbsp;</td>
<td class="mdname" nowrap> <em>append</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Instantiate a <a class="el" href="classlog4cxx_1_1FileAppender.html">FileAppender</a> and open the file designated by <code>filename</code>. The opened filename will become the output destination for this appender.<p>
If the <code>append</code> parameter is true, the file will be appended to. Otherwise, the file designated by <code>filename</code> will be truncated before being opened. </td>
</tr>
</table>
<a class="anchor" name="a3" doxytag="log4cxx::FileAppender::FileAppender" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classlog4cxx_1_1FileAppender.html">FileAppender</a> </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">LayoutPtr</a> &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>layout</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const String &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>filename</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Instantiate a <a class="el" href="classlog4cxx_1_1FileAppender.html">FileAppender</a> and open the file designated by <code>filename</code>. The opened filename will become the output destination for this appender.<p>
The file will be appended to. </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a9" doxytag="log4cxx::FileAppender::activateOptions" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void activateOptions </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Sets and <em>opens</em> the file where the log output will go. The specified file must be writable.<p>
If there was already an opened file, then the previous file is closed first.
<p>
Reimplemented from <a class="el" href="classlog4cxx_1_1AppenderSkeleton.html#a2">AppenderSkeleton</a>.
<p>
Reimplemented in <a class="el" href="classlog4cxx_1_1DailyRollingFileAppender.html#a5">DailyRollingFileAppender</a>. </td>
</tr>
</table>
<a class="anchor" name="b1" doxytag="log4cxx::FileAppender::closeFile" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void closeFile </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Closes the previously opened file. </td>
</tr>
</table>
<a class="anchor" name="b0" doxytag="log4cxx::FileAppender::closeWriter" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void closeWriter </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [protected, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Closes the previously opened file.
<p>
Implements <a class="el" href="classlog4cxx_1_1WriterAppender.html#b1">WriterAppender</a>. </td>
</tr>
</table>
<a class="anchor" name="a7" doxytag="log4cxx::FileAppender::getAppend" ></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"> bool getAppend </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]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Returns the value of the <b>Append</b> option. </td>
</tr>
</table>
<a class="anchor" name="a11" doxytag="log4cxx::FileAppender::getBufferedIO" ></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"> bool getBufferedIO </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]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Get the value of the <b>BufferedIO</b> option.<p>
BufferedIO will significatnly increase performance on heavily loaded systems. </td>
</tr>
</table>
<a class="anchor" name="a12" doxytag="log4cxx::FileAppender::getBufferSize" ></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"> int getBufferSize </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]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Get the size of the IO buffer. </td>
</tr>
</table>
<a class="anchor" name="a8" doxytag="log4cxx::FileAppender::getFile" ></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"> const String&amp; getFile </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]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Returns the value of the <b>File</b> option. </td>
</tr>
</table>
<a class="anchor" name="a13" doxytag="log4cxx::FileAppender::setAppend" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void setAppend </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">bool&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>fileAppend</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
The <b>Append</b> option takes a boolean value. It is set to <code>true</code> by default. If true, then <code>File</code> will be opened in append mode by <a class="el" href="classlog4cxx_1_1FileAppender.html#a5">setFile</a> (see above). Otherwise, setFile will open <code>File</code> in truncate mode.<p>
Note: Actual opening of the file is made when <a class="el" href="classlog4cxx_1_1FileAppender.html#a9">activateOptions</a> is called, not when the options are set. </td>
</tr>
</table>
<a class="anchor" name="a14" doxytag="log4cxx::FileAppender::setBufferedIO" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void setBufferedIO </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">bool&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>bufferedIO</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
The <b>BufferedIO</b> option takes a boolean value. It is set to <code>false</code> by default. If true, then <code>File</code> will be opened in buffered mode.<p>
BufferedIO will significantly increase performance on heavily loaded systems. </td>
</tr>
</table>
<a class="anchor" name="a15" doxytag="log4cxx::FileAppender::setBufferSize" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void setBufferSize </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">int&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>bufferSize</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Set the size of the IO buffer. </td>
</tr>
</table>
<a class="anchor" name="a6" doxytag="log4cxx::FileAppender::setFile" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void setFile </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const String &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>file</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>bool&nbsp;</td>
<td class="mdname" nowrap> <em>append</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>bool&nbsp;</td>
<td class="mdname" nowrap> <em>bufferedIO</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int&nbsp;</td>
<td class="mdname" nowrap> <em>bufferSize</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Sets and <em>opens</em> the file where the log output will go. The specified file must be writable.<p>
If there was already an opened file, then the previous file is closed first.<p>
<b>Do not use this method directly. To configure a <a class="el" href="classlog4cxx_1_1FileAppender.html">FileAppender</a> or one of its subclasses, set its properties one by one and then call activateOptions.</b><p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>file</em>&nbsp;</td><td>The path to the log file. </td></tr>
<tr><td valign=top><em>append</em>&nbsp;</td><td>If true will append to fileName. Otherwise will truncate fileName. </td></tr>
<tr><td valign=top><em>bufferedIO</em>&nbsp;</td><td>Do we do bufferedIO? </td></tr>
<tr><td valign=top><em>bufferSize</em>&nbsp;</td><td>How big should the IO buffer be?</td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="a5" doxytag="log4cxx::FileAppender::setFile" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void setFile </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const String &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>file</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
The <b>File</b> property takes a string value which should be the name of the file to append to.<p>
<b>Note that the special values "System.out" or "System.err" are no longer honored.</b><p>
Note: Actual opening of the file is made when <a class="el" href="classlog4cxx_1_1FileAppender.html#a9">activateOptions</a> is called, not when the options are set. </td>
</tr>
</table>
<a class="anchor" name="a10" doxytag="log4cxx::FileAppender::setOption" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void setOption </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const String &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>option</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const String &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>value</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Set <code>option</code> to <code>value</code>.<p>
The handling of each option depends on the OptionHandler instance. Some options may become active immediately whereas other may be activated only when <a class="el" href="classlog4cxx_1_1FileAppender.html#a9">activateOptions</a> is called.
<p>
Reimplemented from <a class="el" href="classlog4cxx_1_1AppenderSkeleton.html#a3">AppenderSkeleton</a>.
<p>
Reimplemented in <a class="el" href="classlog4cxx_1_1DailyRollingFileAppender.html#a6">DailyRollingFileAppender</a>, and <a class="el" href="classlog4cxx_1_1RollingFileAppender.html#a9">RollingFileAppender</a>. </td>
</tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="p2" doxytag="log4cxx::FileAppender::bufferedIO" ></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"> bool <a class="el" href="classlog4cxx_1_1FileAppender.html#p2">bufferedIO</a><code> [protected]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Do we do bufferedIO? </td>
</tr>
</table>
<a class="anchor" name="p3" doxytag="log4cxx::FileAppender::bufferSize" ></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"> int <a class="el" href="classlog4cxx_1_1FileAppender.html#p3">bufferSize</a><code> [protected]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
How big should the IO buffer be? Default is 8K. </td>
</tr>
</table>
<a class="anchor" name="p0" doxytag="log4cxx::FileAppender::fileAppend" ></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"> bool <a class="el" href="classlog4cxx_1_1FileAppender.html#p0">fileAppend</a><code> [protected]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Append to or truncate the file? The default value for this variable is <code>true</code>, meaning that by default a <code><a class="el" href="classlog4cxx_1_1FileAppender.html">FileAppender</a></code> will append to an existing file and not truncate it. <p>
This option is meaningful only if the <a class="el" href="classlog4cxx_1_1FileAppender.html">FileAppender</a> opens the file. </td>
</tr>
</table>
<a class="anchor" name="p1" doxytag="log4cxx::FileAppender::fileName" ></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"> String <a class="el" href="classlog4cxx_1_1FileAppender.html#p1">fileName</a><code> [protected]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
The name of the log file. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li>fileappender.h<li>fileappender.cpp</ul>
</td>
</tr>
<!-- FOOTER -->
<tr><td colspan="2">
<hr noshade="" size="1"/>
</td></tr>
<tr><td colspan="2">
<div align="center"><font color="#525D76" size="-1"><em>
Copyright &#169; 1999-2004, Apache Software Foundation
</em></font></div>
</td></tr>
</table>
<!-- END main table -->
</body>
</html>
<!-- end the processing -->