Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 806b8574900c6f644b03d5eb76e60aef > files > 16

log4c-doc-1.2.4-1.fc18.noarch.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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>log4c: appender_type_rollingfile.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">log4c
   &#160;<span id="projectnumber">1.2.4</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_6ba53b81c010ccbbf4e80737d395d27b.html">log4c</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">appender_type_rollingfile.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Log4c rolling file appender interface.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;log4c/defs.h&gt;</code><br/>
<code>#include &lt;<a class="el" href="appender_8h_source.html">log4c/appender.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="rollingpolicy_8h_source.html">log4c/rollingpolicy.h</a>&gt;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for appender_type_rollingfile.h:</div>
<div class="dyncontent">
<div class="center"><img src="appender__type__rollingfile_8h__incl.png" border="0" usemap="#appender__type__rollingfile_8h" alt=""/></div>
<map name="appender__type__rollingfile_8h" id="appender__type__rollingfile_8h">
<area shape="rect" id="node5" href="appender_8h.html" title="Implement this interface for your own strategies for printing log statements." alt="" coords="315,80,436,107"/><area shape="rect" id="node27" href="rollingpolicy_8h.html" title="Log4c rolling policy interface. Defines the interface for managing and providing rolling policies..." alt="" coords="155,80,291,107"/><area shape="rect" id="node8" href="layout_8h.html" title="Interface for user specific layout format of log4c_logging_event events." alt="" coords="185,155,287,181"/><area shape="rect" id="node11" href="logging__event_8h.html" title="the internal representation of logging events." alt="" coords="167,229,315,256"/><area shape="rect" id="node14" href="buffer_8h.html" title="log4c buffer" alt="" coords="467,304,568,331"/><area shape="rect" id="node19" href="location__info_8h.html" title="The internal representation of caller location information." alt="" coords="195,304,336,331"/></map>
</div>
</div>
<p><a href="appender__type__rollingfile_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a225a92b1a1970e74f26dce5214a0d3fc"><td class="memItemLeft" align="right" valign="top">rollingfile_udata_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="appender__type__rollingfile_8h.html#a225a92b1a1970e74f26dce5214a0d3fc">rollingfile_make_udata</a> (void)</td></tr>
<tr class="separator:a225a92b1a1970e74f26dce5214a0d3fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a706f9cc21121b6481ffd6464202e698a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="appender__type__rollingfile_8h.html#a706f9cc21121b6481ffd6464202e698a">rollingfile_udata_set_logdir</a> (rollingfile_udata_t *rfudatap, const char *logdir)</td></tr>
<tr class="separator:a706f9cc21121b6481ffd6464202e698a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a61b2109e2daf7a0475bea66bb80cb9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="appender__type__rollingfile_8h.html#a2a61b2109e2daf7a0475bea66bb80cb9">rollingfile_udata_set_files_prefix</a> (rollingfile_udata_t *rfudatap, const char *prefix)</td></tr>
<tr class="separator:a2a61b2109e2daf7a0475bea66bb80cb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac731aa92637e8d6a4d739c268f3dda64"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="appender__type__rollingfile_8h.html#ac731aa92637e8d6a4d739c268f3dda64">rollingfile_udata_set_policy</a> (rollingfile_udata_t *rfudatap, <a class="el" href="rollingpolicy_8h.html#a1c3cf54a065c84e6b4f0c85cbe3832c9">log4c_rollingpolicy_t</a> *policyp)</td></tr>
<tr class="separator:ac731aa92637e8d6a4d739c268f3dda64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0511086e312b3be215d6240e95f15489"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="appender__type__rollingfile_8h.html#a0511086e312b3be215d6240e95f15489">rollingfile_udata_get_logdir</a> (rollingfile_udata_t *rfudatap)</td></tr>
<tr class="separator:a0511086e312b3be215d6240e95f15489"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd9c5586a674ea3d6c76e6018adb5588"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="appender__type__rollingfile_8h.html#acd9c5586a674ea3d6c76e6018adb5588">rollingfile_udata_get_files_prefix</a> (rollingfile_udata_t *rfudatap)</td></tr>
<tr class="separator:acd9c5586a674ea3d6c76e6018adb5588"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d769b5dfc3e9e580cff173704570d5c"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="appender__type__rollingfile_8h.html#a8d769b5dfc3e9e580cff173704570d5c">rollingfile_get_current_file_size</a> (rollingfile_udata_t *rfudatap)</td></tr>
<tr class="separator:a8d769b5dfc3e9e580cff173704570d5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a1c35860f4248d5bf2b57a2728a87bf81"><td class="memItemLeft" align="right" valign="top">__LOG4C_BEGIN_DECLS const <br class="typebreak"/>
<a class="el" href="appender_8h.html#a3b0ea324b72e8122c20c3b237beb923e">log4c_appender_type_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="appender__type__rollingfile_8h.html#a1c35860f4248d5bf2b57a2728a87bf81">log4c_appender_type_rollingfile</a></td></tr>
<tr class="separator:a1c35860f4248d5bf2b57a2728a87bf81"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Log4c rolling file appender interface. </p>
<p>The rolling file appender implements a logging mechanism of a list of files up to a maximum number.</p>
<p>The files are written by default to the current directory with logging names folowing the pattern log.1, log.2 etc. These parameters may be changed using the appropriate setter functions.</p>
<p>If the appender fails to open logfiles for writing then the messages are logged to stderr&ndash;it will continue to try to open the zero-th file for writing at rollover events so if it succeeds at some point to open that file the messages will start to appear therein and will no longer be sent to stderr.</p>
<p>Switching from logging from one file to the next is referred to as a 'rollover event'.</p>
<p>The policy that determines when a rollover event should happen is called a 'rolling policy'.</p>
<p>A mechanism is provided to allow different rolling policies to be defined.</p>
<p>Log4c ships with (and defaults to) the classic size-window rollover policy: this triggers rollover when files reach a maximum size. The first file in the list is always the current file; when a rollover event occurs files are shifted up by one position in the list&ndash;if the number of files in the list has already reached the max then the oldest file is rotated out of the window.</p>
<p>See the documentation in the <a class="el" href="rollingpolicy__type__sizewin_8h.html" title="Log4c rolling file size-win interface. Log4c ships with (and defaults to) the classic size-window rol...">rollingpolicy_type_sizewin.h</a> file for more details on the size-win rollover policy. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a8d769b5dfc3e9e580cff173704570d5c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long rollingfile_get_current_file_size </td>
          <td>(</td>
          <td class="paramtype">rollingfile_udata_t *&#160;</td>
          <td class="paramname"><em>rfudatap</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the prefix string in this rolling file appender configuration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rfudatap</td><td>the rolling file appender configuration object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the current size of the file being logged to. </dd></dl>

</div>
</div>
<a class="anchor" id="a225a92b1a1970e74f26dce5214a0d3fc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">rollingfile_udata_t* rollingfile_make_udata </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get a new rolling file appender configuration object. </p>
<dl class="section return"><dt>Returns</dt><dd>a new rolling file appender configuration object, otherwise NULL. </dd></dl>

</div>
</div>
<a class="anchor" id="acd9c5586a674ea3d6c76e6018adb5588"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* rollingfile_udata_get_files_prefix </td>
          <td>(</td>
          <td class="paramtype">rollingfile_udata_t *&#160;</td>
          <td class="paramname"><em>rfudatap</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the prefix string in this rolling file appender configuration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rfudatap</td><td>the rolling file appender configuration object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the prefix. </dd></dl>

</div>
</div>
<a class="anchor" id="a0511086e312b3be215d6240e95f15489"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* rollingfile_udata_get_logdir </td>
          <td>(</td>
          <td class="paramtype">rollingfile_udata_t *&#160;</td>
          <td class="paramname"><em>rfudatap</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the logging directory in this rolling file appender configuration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rfudatap</td><td>the rolling file appender configuration object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the logging directory. </dd></dl>

</div>
</div>
<a class="anchor" id="a2a61b2109e2daf7a0475bea66bb80cb9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rollingfile_udata_set_files_prefix </td>
          <td>(</td>
          <td class="paramtype">rollingfile_udata_t *&#160;</td>
          <td class="paramname"><em>rfudatap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>prefix</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the prefix string in this rolling file appender configuration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rfudatap</td><td>the rolling file appender configuration object. </td></tr>
    <tr><td class="paramname">prefix</td><td>the logging files prfix to use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero if successful, non-zero otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="a706f9cc21121b6481ffd6464202e698a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rollingfile_udata_set_logdir </td>
          <td>(</td>
          <td class="paramtype">rollingfile_udata_t *&#160;</td>
          <td class="paramname"><em>rfudatap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>logdir</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the logging directory in this rolling file appender configuration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rfudatap</td><td>the rolling file appender configuration object. </td></tr>
    <tr><td class="paramname">logdir</td><td>the logging directory to set. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero if successful, non-zero otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="ac731aa92637e8d6a4d739c268f3dda64"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rollingfile_udata_set_policy </td>
          <td>(</td>
          <td class="paramtype">rollingfile_udata_t *&#160;</td>
          <td class="paramname"><em>rfudatap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="rollingpolicy_8h.html#a1c3cf54a065c84e6b4f0c85cbe3832c9">log4c_rollingpolicy_t</a> *&#160;</td>
          <td class="paramname"><em>policyp</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the rolling policy in this rolling file appender configuration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rfudatap</td><td>the rolling file appender configuration object. </td></tr>
    <tr><td class="paramname">policyp</td><td>the logging files prfix to use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero if successful, non-zero otherwise. </dd></dl>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="a1c35860f4248d5bf2b57a2728a87bf81"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__LOG4C_BEGIN_DECLS const <a class="el" href="appender_8h.html#a3b0ea324b72e8122c20c3b237beb923e">log4c_appender_type_t</a> log4c_appender_type_rollingfile</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>rollingfile appender type definition.</p>
<p>This should be used as a parameter to the <a class="el" href="appender_8h.html#a5749474749c8b3ec049acb82add2501f">log4c_appender_set_type()</a> routine to set the type of the appender. </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3.1
</small></address>
</body>
</html>