Sophie

Sophie

distrib > Fedora > 16 > x86_64 > by-pkgid > ef445f0ce4be1c28e0c51502e9156d24 > files > 267

log4cxx-devel-0.10.0-10.fc15.x86_64.rpm

<!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"/>
<title>Apache log4cxx: WriterAppender Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Apache log4cxx&#160;<span id="projectnumber">Version 0.10.0</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <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>
    </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>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('classlog4cxx_1_1_writer_appender.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle">
<h1>WriterAppender Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="log4cxx::WriterAppender" --><!-- doxytag: inherits="log4cxx::AppenderSkeleton" -->
<p><a class="el" href="classlog4cxx_1_1_writer_appender.html" title="WriterAppender appends log events to a standard output stream.">WriterAppender</a> appends log events to a standard output stream.  
<a href="#_details">More...</a></p>

<p>Inherits <a class="el" href="classlog4cxx_1_1_appender_skeleton.html">log4cxx::AppenderSkeleton</a>.</p>

<p>Inherited by <a class="el" href="classlog4cxx_1_1_console_appender.html">ConsoleAppender</a>, and <a class="el" href="classlog4cxx_1_1_file_appender.html">FileAppender</a>.</p>

<p><a href="classlog4cxx_1_1_writer_appender-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#ab42c7b837d3e2fb221d401edb7ccbc58">WriterAppender</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This default constructor does nothing.  <a href="#ab42c7b837d3e2fb221d401edb7ccbc58"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#a45595e7074844ef66a4e3633b4bf385a">~WriterAppender</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#a9fe8531491720e83f1d25862d918a37d">activateOptions</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> &amp;<a class="el" href="classlog4cxx_1_1_appender_skeleton.html#a6c72571775abf91a74fade4e2c2b9af8">pool</a>)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Derived appenders should override this method if option structure requires it.  <a href="#a9fe8531491720e83f1d25862d918a37d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#a58ab91de34ae4ce9b59c62695ec4fc31">setImmediateFlush</a> (bool value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">If the <b>ImmediateFlush</b> option is set to <code>true</code>, the appender will flush at the end of each write.  <a href="#a58ab91de34ae4ce9b59c62695ec4fc31"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#af2f592fce6f7a25d47bee3bfb187ca1a">getImmediateFlush</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns value of the <b>ImmediateFlush</b> option.  <a href="#af2f592fce6f7a25d47bee3bfb187ca1a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#ac0184656854a0362e99b46512b6a1761">append</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">spi::LoggingEventPtr</a> &amp;event, <a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> &amp;p)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This method is called by the <a class="el" href="classlog4cxx_1_1_appender_skeleton.html#a2df87e9db87ebe5396ea94fb9c25c488" title="This method performs threshold checks and invokes filters before delegating actual logging to the sub...">AppenderSkeleton::doAppend</a> method.  <a href="#ac0184656854a0362e99b46512b6a1761"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#a47feccb1873356363e4d0e302bc3822c">close</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Close this appender instance.  <a href="#a47feccb1873356363e4d0e302bc3822c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#a7b5502ee1e14732e5c6817372f076497">getEncoding</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#ad61a2dfe920558b5d2057d1ca8a8df3a">setEncoding</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#ac1d269357907e0809687a2bec962e1c8">setOption</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;option, const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set <code>option</code> to <code>value</code>.  <a href="#ac1d269357907e0809687a2bec962e1c8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#a45cd5e544a9ec09e32ff34356c0cafa5">setWriter</a> (const log4cxx::helpers::WriterPtr &amp;writer)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#a4312e727a9ea814779d2c9950dc3c73e">requiresLayout</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Configurators call this method to determine if the appender requires a layout.  <a href="#a4312e727a9ea814779d2c9950dc3c73e"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#aec1ecba3908c4f494f3bd652530b8226">WriterAppender</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">LayoutPtr</a> &amp;<a class="el" href="classlog4cxx_1_1_appender_skeleton.html#af1f4e6a2229d95a18324c4e7fa71be65">layout</a>, log4cxx::helpers::WriterPtr &amp;writer)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#a3fa0b32c94701c354192c2d303bd8f29">WriterAppender</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">LayoutPtr</a> &amp;<a class="el" href="classlog4cxx_1_1_appender_skeleton.html#af1f4e6a2229d95a18324c4e7fa71be65">layout</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#a56705c015702739ee013e18837d5820f">checkEntryConditions</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This method determines if there is a sense in attempting to append.  <a href="#a56705c015702739ee013e18837d5820f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#ac734cbad6115274c54627ddc5b8c7762">closeWriter</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Close the underlying <a class="el" href="classlog4cxx_1_1helpers_1_1_writer.html">log4cxx::helpers::Writer</a>.  <a href="#ac734cbad6115274c54627ddc5b8c7762"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual log4cxx::helpers::WriterPtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#af2dcda32c0a2332df966396a7829ecdb">createWriter</a> (log4cxx::helpers::OutputStreamPtr &amp;os)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an OutputStreamWriter when passed an OutputStream.  <a href="#af2dcda32c0a2332df966396a7829ecdb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#a6c8e2c71b74a5c4f567a45fe723e6094">subAppend</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">spi::LoggingEventPtr</a> &amp;event, <a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> &amp;p)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Actual writing occurs here.  <a href="#a6c8e2c71b74a5c4f567a45fe723e6094"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#ae5576da69e2d3d31bf7e5668833fa2ca">writeFooter</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> &amp;p)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write a footer as produced by the embedded layout's <a class="el" href="classlog4cxx_1_1_layout.html#ae8f7d8f894b39b251cada7674bdfe8d2" title="Append the footer for the layout format.">Layout::appendFooter</a> method.  <a href="#ae5576da69e2d3d31bf7e5668833fa2ca"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_writer_appender.html#aa0eccd6ddf3cf28dfb087ff6e961d129">writeHeader</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> &amp;p)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write a header as produced by the embedded layout's <a class="el" href="classlog4cxx_1_1_layout.html#ad1b07d688e39f3a8d71acec8f6d7b878" title="Append the header for the layout format.">Layout::appendHeader</a> method.  <a href="#aa0eccd6ddf3cf28dfb087ff6e961d129"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classlog4cxx_1_1_writer_appender.html" title="WriterAppender appends log events to a standard output stream.">WriterAppender</a> appends log events to a standard output stream. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ab42c7b837d3e2fb221d401edb7ccbc58"></a><!-- doxytag: member="log4cxx::WriterAppender::WriterAppender" ref="ab42c7b837d3e2fb221d401edb7ccbc58" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classlog4cxx_1_1_writer_appender.html">WriterAppender</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This default constructor does nothing. </p>

</div>
</div>
<a class="anchor" id="aec1ecba3908c4f494f3bd652530b8226"></a><!-- doxytag: member="log4cxx::WriterAppender::WriterAppender" ref="aec1ecba3908c4f494f3bd652530b8226" args="(const LayoutPtr &amp;layout, log4cxx::helpers::WriterPtr &amp;writer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classlog4cxx_1_1_writer_appender.html">WriterAppender</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">LayoutPtr</a> &amp;&#160;</td>
          <td class="paramname"><em>layout</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">log4cxx::helpers::WriterPtr &amp;&#160;</td>
          <td class="paramname"><em>writer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a3fa0b32c94701c354192c2d303bd8f29"></a><!-- doxytag: member="log4cxx::WriterAppender::WriterAppender" ref="a3fa0b32c94701c354192c2d303bd8f29" args="(const LayoutPtr &amp;layout)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classlog4cxx_1_1_writer_appender.html">WriterAppender</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">LayoutPtr</a> &amp;&#160;</td>
          <td class="paramname"><em>layout</em></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a45595e7074844ef66a4e3633b4bf385a"></a><!-- doxytag: member="log4cxx::WriterAppender::~WriterAppender" ref="a45595e7074844ef66a4e3633b4bf385a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">~<a class="el" href="classlog4cxx_1_1_writer_appender.html">WriterAppender</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a9fe8531491720e83f1d25862d918a37d"></a><!-- doxytag: member="log4cxx::WriterAppender::activateOptions" ref="a9fe8531491720e83f1d25862d918a37d" args="(log4cxx::helpers::Pool &amp;pool)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void activateOptions </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> &amp;&#160;</td>
          <td class="paramname"><em>pool</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Derived appenders should override this method if option structure requires it. </p>

<p>Reimplemented from <a class="el" href="classlog4cxx_1_1_appender_skeleton.html#abe1aa95ede9cc9d0609905154129c0ba">AppenderSkeleton</a>.</p>

<p>Reimplemented in <a class="el" href="classlog4cxx_1_1_console_appender.html#aa3df68f8aae152299471992071e202f5">ConsoleAppender</a>, <a class="el" href="classlog4cxx_1_1_daily_rolling_file_appender.html#a580abdcb8fd42d07eaf679166f77bc34">DailyRollingFileAppender</a>, <a class="el" href="classlog4cxx_1_1_file_appender.html#aa3df68f8aae152299471992071e202f5">FileAppender</a>, <a class="el" href="classlog4cxx_1_1rolling_1_1_rolling_file_appender_skeleton.html#a580abdcb8fd42d07eaf679166f77bc34">RollingFileAppenderSkeleton</a>, and <a class="el" href="classlog4cxx_1_1_rolling_file_appender.html#a75035ac63aad24ddcbb340ddaba57f1c">RollingFileAppender</a>.</p>

</div>
</div>
<a class="anchor" id="ac0184656854a0362e99b46512b6a1761"></a><!-- doxytag: member="log4cxx::WriterAppender::append" ref="ac0184656854a0362e99b46512b6a1761" args="(const spi::LoggingEventPtr &amp;event, log4cxx::helpers::Pool &amp;p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void append </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">spi::LoggingEventPtr</a> &amp;&#160;</td>
          <td class="paramname"><em>event</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> &amp;&#160;</td>
          <td class="paramname"><em>p</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This method is called by the <a class="el" href="classlog4cxx_1_1_appender_skeleton.html#a2df87e9db87ebe5396ea94fb9c25c488" title="This method performs threshold checks and invokes filters before delegating actual logging to the sub...">AppenderSkeleton::doAppend</a> method. </p>
<p>If the output stream exists and is writable then write a log statement to the output stream. Otherwise, write a single warning message to <code>stderr</code>.</p>
<p>The format of the output will depend on this appender's layout. </p>

<p>Implements <a class="el" href="classlog4cxx_1_1_appender_skeleton.html#a4c08a91d859f636117f07463bb53fe41">AppenderSkeleton</a>.</p>

</div>
</div>
<a class="anchor" id="a56705c015702739ee013e18837d5820f"></a><!-- doxytag: member="log4cxx::WriterAppender::checkEntryConditions" ref="a56705c015702739ee013e18837d5820f" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool checkEntryConditions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This method determines if there is a sense in attempting to append. </p>
<p>It checks whether there is a set output target and also if there is a set layout. If these checks fail, then the boolean value <code>false</code> is returned. </p>

</div>
</div>
<a class="anchor" id="a47feccb1873356363e4d0e302bc3822c"></a><!-- doxytag: member="log4cxx::WriterAppender::close" ref="a47feccb1873356363e4d0e302bc3822c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void close </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Close this appender instance. </p>
<p>The underlying stream or writer is also closed.</p>
<p>Closed appenders cannot be reused. </p>

<p>Implements <a class="el" href="classlog4cxx_1_1_appender.html#af6ee7eacbde6b379b68d954e44f6e549">Appender</a>.</p>

<p>Reimplemented in <a class="el" href="classlog4cxx_1_1rolling_1_1_rolling_file_appender_skeleton.html#a5ae591df94fc66ccb85cbb6565368bca">RollingFileAppenderSkeleton</a>.</p>

</div>
</div>
<a class="anchor" id="ac734cbad6115274c54627ddc5b8c7762"></a><!-- doxytag: member="log4cxx::WriterAppender::closeWriter" ref="ac734cbad6115274c54627ddc5b8c7762" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void closeWriter </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Close the underlying <a class="el" href="classlog4cxx_1_1helpers_1_1_writer.html">log4cxx::helpers::Writer</a>. </p>

</div>
</div>
<a class="anchor" id="af2dcda32c0a2332df966396a7829ecdb"></a><!-- doxytag: member="log4cxx::WriterAppender::createWriter" ref="af2dcda32c0a2332df966396a7829ecdb" args="(log4cxx::helpers::OutputStreamPtr &amp;os)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual log4cxx::helpers::WriterPtr createWriter </td>
          <td>(</td>
          <td class="paramtype">log4cxx::helpers::OutputStreamPtr &amp;&#160;</td>
          <td class="paramname"><em>os</em></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns an OutputStreamWriter when passed an OutputStream. </p>
<p>The encoding used will depend on the value of the <code>encoding</code> property. If the encoding value is specified incorrectly the writer will be opened using the default system encoding (an error message will be printed to the loglog. </p>

<p>Reimplemented in <a class="el" href="classlog4cxx_1_1rolling_1_1_rolling_file_appender_skeleton.html#a63e7cf41bff411d962955de0d8da46c3">RollingFileAppenderSkeleton</a>.</p>

</div>
</div>
<a class="anchor" id="a7b5502ee1e14732e5c6817372f076497"></a><!-- doxytag: member="log4cxx::WriterAppender::getEncoding" ref="a7b5502ee1e14732e5c6817372f076497" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> getEncoding </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="af2f592fce6f7a25d47bee3bfb187ca1a"></a><!-- doxytag: member="log4cxx::WriterAppender::getImmediateFlush" ref="af2f592fce6f7a25d47bee3bfb187ca1a" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool getImmediateFlush </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns value of the <b>ImmediateFlush</b> option. </p>

</div>
</div>
<a class="anchor" id="a4312e727a9ea814779d2c9950dc3c73e"></a><!-- doxytag: member="log4cxx::WriterAppender::requiresLayout" ref="a4312e727a9ea814779d2c9950dc3c73e" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool requiresLayout </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Configurators call this method to determine if the appender requires a layout. </p>
<p>If this method returns <code>true</code>, meaning that layout is required, then the configurator will configure an layout using the configuration information at its disposal. If this method returns <code>false</code>, meaning that a layout is not required, then layout configuration will be skipped even if there is available layout configuration information at the disposal of the configurator..</p>
<p>In the rather exceptional case, where the appender implementation admits a layout but can also work without it, then the appender should return <code>true</code>. </p>

<p>Implements <a class="el" href="classlog4cxx_1_1_appender.html#a1fa0a21a0f0a6ec3a9e92a98db9ffa85">Appender</a>.</p>

</div>
</div>
<a class="anchor" id="ad61a2dfe920558b5d2057d1ca8a8df3a"></a><!-- doxytag: member="log4cxx::WriterAppender::setEncoding" ref="ad61a2dfe920558b5d2057d1ca8a8df3a" args="(const LogString &amp;value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setEncoding </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></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a58ab91de34ae4ce9b59c62695ec4fc31"></a><!-- doxytag: member="log4cxx::WriterAppender::setImmediateFlush" ref="a58ab91de34ae4ce9b59c62695ec4fc31" args="(bool value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setImmediateFlush </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>If the <b>ImmediateFlush</b> option is set to <code>true</code>, the appender will flush at the end of each write. </p>
<p>This is the default behavior. If the option is set to <code>false</code>, then the underlying stream can defer writing to physical medium to a later time.</p>
<p>Avoiding the flush operation at the end of each append results in a performance gain of 10 to 20 percent. However, there is safety tradeoff involved in skipping flushing. Indeed, when flushing is skipped, then it is likely that the last few log events will not be recorded on disk when the application exits. This is a high price to pay even for a 20% performance gain. </p>

</div>
</div>
<a class="anchor" id="ac1d269357907e0809687a2bec962e1c8"></a><!-- doxytag: member="log4cxx::WriterAppender::setOption" ref="ac1d269357907e0809687a2bec962e1c8" args="(const LogString &amp;option, const LogString &amp;value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setOption </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
          <td class="paramname"><em>option</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><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set <code>option</code> to <code>value</code>. </p>
<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_1_writer_appender.html#a9fe8531491720e83f1d25862d918a37d" title="Derived appenders should override this method if option structure requires it.">activateOptions</a> is called. </p>

<p>Reimplemented from <a class="el" href="classlog4cxx_1_1_appender_skeleton.html#aee5023c29cca9dc68164b22a01cb7c6e">AppenderSkeleton</a>.</p>

<p>Reimplemented in <a class="el" href="classlog4cxx_1_1_console_appender.html#ac1d269357907e0809687a2bec962e1c8">ConsoleAppender</a>, <a class="el" href="classlog4cxx_1_1_daily_rolling_file_appender.html#ac1d269357907e0809687a2bec962e1c8">DailyRollingFileAppender</a>, <a class="el" href="classlog4cxx_1_1_file_appender.html#ac1d269357907e0809687a2bec962e1c8">FileAppender</a>, and <a class="el" href="classlog4cxx_1_1_rolling_file_appender.html#aee5023c29cca9dc68164b22a01cb7c6e">RollingFileAppender</a>.</p>

</div>
</div>
<a class="anchor" id="a45cd5e544a9ec09e32ff34356c0cafa5"></a><!-- doxytag: member="log4cxx::WriterAppender::setWriter" ref="a45cd5e544a9ec09e32ff34356c0cafa5" args="(const log4cxx::helpers::WriterPtr &amp;writer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setWriter </td>
          <td>(</td>
          <td class="paramtype">const log4cxx::helpers::WriterPtr &amp;&#160;</td>
          <td class="paramname"><em>writer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sets the Writer where the log output will go. The specified Writer must be opened by the user and be writable.</p>
<p>The <code>java.io.Writer</code> will be closed when the appender instance is closed.</p>
<p><b>WARNING:</b> Logging to an unopened Writer will fail. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">writer</td><td>An already opened Writer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a6c8e2c71b74a5c4f567a45fe723e6094"></a><!-- doxytag: member="log4cxx::WriterAppender::subAppend" ref="a6c8e2c71b74a5c4f567a45fe723e6094" args="(const spi::LoggingEventPtr &amp;event, log4cxx::helpers::Pool &amp;p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void subAppend </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">spi::LoggingEventPtr</a> &amp;&#160;</td>
          <td class="paramname"><em>event</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> &amp;&#160;</td>
          <td class="paramname"><em>p</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Actual writing occurs here. </p>

<p>Reimplemented in <a class="el" href="classlog4cxx_1_1rolling_1_1_rolling_file_appender_skeleton.html#a6c8e2c71b74a5c4f567a45fe723e6094">RollingFileAppenderSkeleton</a>.</p>

</div>
</div>
<a class="anchor" id="ae5576da69e2d3d31bf7e5668833fa2ca"></a><!-- doxytag: member="log4cxx::WriterAppender::writeFooter" ref="ae5576da69e2d3d31bf7e5668833fa2ca" args="(log4cxx::helpers::Pool &amp;p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void writeFooter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> &amp;&#160;</td>
          <td class="paramname"><em>p</em></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write a footer as produced by the embedded layout's <a class="el" href="classlog4cxx_1_1_layout.html#ae8f7d8f894b39b251cada7674bdfe8d2" title="Append the footer for the layout format.">Layout::appendFooter</a> method. </p>

</div>
</div>
<a class="anchor" id="aa0eccd6ddf3cf28dfb087ff6e961d129"></a><!-- doxytag: member="log4cxx::WriterAppender::writeHeader" ref="aa0eccd6ddf3cf28dfb087ff6e961d129" args="(log4cxx::helpers::Pool &amp;p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void writeHeader </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> &amp;&#160;</td>
          <td class="paramname"><em>p</em></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write a header as produced by the embedded layout's <a class="el" href="classlog4cxx_1_1_layout.html#ad1b07d688e39f3a8d71acec8f6d7b878" title="Append the header for the layout format.">Layout::appendHeader</a> method. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="writerappender_8h.html">writerappender.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacelog4cxx.html">log4cxx</a>      </li>
      <li class="navelem"><a class="el" href="classlog4cxx_1_1_writer_appender.html">WriterAppender</a>      </li>
<!--
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>