Sophie

Sophie

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

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: rollingpolicy_type_sizewin.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="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">rollingpolicy_type_sizewin.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Log4c rolling file size-win interface. 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.  
<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="rollingpolicy_8h_source.html">log4c/rollingpolicy.h</a>&gt;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for rollingpolicy_type_sizewin.h:</div>
<div class="dyncontent">
<div class="center"><img src="rollingpolicy__type__sizewin_8h__incl.png" border="0" usemap="#rollingpolicy__type__sizewin_8h" alt=""/></div>
<map name="rollingpolicy__type__sizewin_8h" id="rollingpolicy__type__sizewin_8h">
<area shape="rect" id="node5" href="rollingpolicy_8h.html" title="Log4c rolling policy interface. Defines the interface for managing and providing rolling policies..." alt="" coords="52,96,188,123"/><area shape="rect" id="node10" href="layout_8h.html" title="Interface for user specific layout format of log4c_logging_event events." alt="" coords="157,171,259,197"/><area shape="rect" id="node13" href="logging__event_8h.html" title="the internal representation of logging events." alt="" coords="287,245,435,272"/><area shape="rect" id="node16" href="buffer_8h.html" title="log4c buffer" alt="" coords="456,320,557,347"/><area shape="rect" id="node21" href="location__info_8h.html" title="The internal representation of caller location information." alt="" coords="291,320,432,347"/></map>
</div>
</div>
<p><a href="rollingpolicy__type__sizewin_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="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a9fece7b1d4656335ad7c4cead54fd3b9"><td class="memItemLeft" align="right" valign="top">typedef struct __sizewin_udata&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rollingpolicy__type__sizewin_8h.html#a9fece7b1d4656335ad7c4cead54fd3b9">rollingpolicy_sizewin_udata_t</a></td></tr>
<tr class="separator:a9fece7b1d4656335ad7c4cead54fd3b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a784c7aef21cc0d0675ec053c92d22891"><td class="memItemLeft" align="right" valign="top"><a class="el" href="rollingpolicy__type__sizewin_8h.html#a9fece7b1d4656335ad7c4cead54fd3b9">rollingpolicy_sizewin_udata_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rollingpolicy__type__sizewin_8h.html#a784c7aef21cc0d0675ec053c92d22891">sizewin_make_udata</a> (void)</td></tr>
<tr class="separator:a784c7aef21cc0d0675ec053c92d22891"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39ef1f9fe5b51ffe60c953e953b6787e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rollingpolicy__type__sizewin_8h.html#a39ef1f9fe5b51ffe60c953e953b6787e">sizewin_udata_set_file_maxsize</a> (<a class="el" href="rollingpolicy__type__sizewin_8h.html#a9fece7b1d4656335ad7c4cead54fd3b9">rollingpolicy_sizewin_udata_t</a> *swup, long max_size)</td></tr>
<tr class="separator:a39ef1f9fe5b51ffe60c953e953b6787e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed04e0d436c0e8a1eb277c9a5b5cff72"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rollingpolicy__type__sizewin_8h.html#aed04e0d436c0e8a1eb277c9a5b5cff72">sizewin_udata_set_max_num_files</a> (<a class="el" href="rollingpolicy__type__sizewin_8h.html#a9fece7b1d4656335ad7c4cead54fd3b9">rollingpolicy_sizewin_udata_t</a> *swup, long max_num)</td></tr>
<tr class="separator:aed04e0d436c0e8a1eb277c9a5b5cff72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0412abddc8141e4d74abcca9c0b1673"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rollingpolicy__type__sizewin_8h.html#aa0412abddc8141e4d74abcca9c0b1673">sizewin_udata_set_appender</a> (<a class="el" href="rollingpolicy__type__sizewin_8h.html#a9fece7b1d4656335ad7c4cead54fd3b9">rollingpolicy_sizewin_udata_t</a> *swup, <a class="el" href="appender_8h.html#ab9a6df639c26566a4576233dfcc21b55">log4c_appender_t</a> *app)</td></tr>
<tr class="separator:aa0412abddc8141e4d74abcca9c0b1673"><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 size-win interface. 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>If the max file size is set to zero, this means 'no-limit'.</p>
<p>The default parameters for the size-win policy are 5 files of maximum size of 20kilobytes each. These parameters may be changed using the appropriate setter functions. </p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="a9fece7b1d4656335ad7c4cead54fd3b9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct __sizewin_udata <a class="el" href="rollingpolicy__type__sizewin_8h.html#a9fece7b1d4656335ad7c4cead54fd3b9">rollingpolicy_sizewin_udata_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>log4c size-win rolling policy type </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a784c7aef21cc0d0675ec053c92d22891"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="rollingpolicy__type__sizewin_8h.html#a9fece7b1d4656335ad7c4cead54fd3b9">rollingpolicy_sizewin_udata_t</a>* sizewin_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 size-win rolling policy </p>
<dl class="section return"><dt>Returns</dt><dd>a new size-win rolling policy, otherwise NULL. </dd></dl>

</div>
</div>
<a class="anchor" id="aa0412abddc8141e4d74abcca9c0b1673"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int sizewin_udata_set_appender </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="rollingpolicy__type__sizewin_8h.html#a9fece7b1d4656335ad7c4cead54fd3b9">rollingpolicy_sizewin_udata_t</a> *&#160;</td>
          <td class="paramname"><em>swup</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="appender_8h.html#ab9a6df639c26566a4576233dfcc21b55">log4c_appender_t</a> *&#160;</td>
          <td class="paramname"><em>app</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the rolling file appender in this rolling policy configuration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">swup</td><td>the size-win configuration object. </td></tr>
    <tr><td class="paramname">app</td><td>the rolling file appender 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="a39ef1f9fe5b51ffe60c953e953b6787e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int sizewin_udata_set_file_maxsize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="rollingpolicy__type__sizewin_8h.html#a9fece7b1d4656335ad7c4cead54fd3b9">rollingpolicy_sizewin_udata_t</a> *&#160;</td>
          <td class="paramname"><em>swup</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>max_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the maximum file size in this rolling policy configuration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">swup</td><td>the size-win configuration object. </td></tr>
    <tr><td class="paramname">max_size</td><td>the approximate maximum size any logging file will attain. If you set zero then it means 'no-limit' and so only one file of unlimited size will be used for logging. </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="aed04e0d436c0e8a1eb277c9a5b5cff72"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int sizewin_udata_set_max_num_files </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="rollingpolicy__type__sizewin_8h.html#a9fece7b1d4656335ad7c4cead54fd3b9">rollingpolicy_sizewin_udata_t</a> *&#160;</td>
          <td class="paramname"><em>swup</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>max_num</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the maximum number of filesin this rolling policy configuration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">swup</td><td>the size-win configuration object. </td></tr>
    <tr><td class="paramname">max_num</td><td>the maximum number of files in the list. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero if successful, non-zero otherwise. </dd></dl>

</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>