Sophie

Sophie

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

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.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="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">rollingpolicy.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Log4c rolling policy interface. Defines the interface for managing and providing rolling policies.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;log4c/defs.h&gt;</code><br/>
<code>#include &lt;<a class="el" href="layout_8h_source.html">log4c/layout.h</a>&gt;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for rollingpolicy.h:</div>
<div class="dyncontent">
<div class="center"><img src="rollingpolicy_8h__incl.png" border="0" usemap="#rollingpolicy_8h" alt=""/></div>
<map name="rollingpolicy_8h" id="rollingpolicy_8h">
<area shape="rect" id="node7" href="layout_8h.html" title="Interface for user specific layout format of log4c_logging_event events." alt="" coords="281,80,383,107"/><area shape="rect" id="node10" href="logging__event_8h.html" title="the internal representation of logging events." alt="" coords="258,155,405,181"/><area shape="rect" id="node13" href="buffer_8h.html" title="log4c buffer" alt="" coords="5,229,107,256"/><area shape="rect" id="node18" href="location__info_8h.html" title="The internal representation of caller location information." alt="" coords="237,229,379,256"/></map>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="rollingpolicy_8h__dep__incl.png" border="0" usemap="#rollingpolicy_8hdep" alt=""/></div>
<map name="rollingpolicy_8hdep" id="rollingpolicy_8hdep">
<area shape="rect" id="node3" href="appender__type__rollingfile_8h.html" title="Log4c rolling file appender interface." alt="" coords="5,88,181,115"/><area shape="rect" id="node5" href="rollingpolicy__type__sizewin_8h.html" title="Log4c rolling file size&#45;win interface. Log4c ships with (and defaults to) the classic size&#45;window rol..." alt="" coords="205,81,328,122"/></map>
</div>
</div>
<p><a href="rollingpolicy_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="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlog4c__rollingpolicy__type.html">log4c_rollingpolicy_type</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">log4c rollingpolicy type. Defines the interface a specific policy must provide to the rollingfile appender.  <a href="structlog4c__rollingpolicy__type.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a9d60b2e1decada3c0bdaa80b4d1f7d0a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rollingpolicy_8h.html#a9d60b2e1decada3c0bdaa80b4d1f7d0a">ROLLINGPOLICY_ROLLOVER_ERR_CAN_LOG</a>&#160;&#160;&#160;0x05</td></tr>
<tr class="separator:a9d60b2e1decada3c0bdaa80b4d1f7d0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a1c3cf54a065c84e6b4f0c85cbe3832c9"><td class="memItemLeft" align="right" valign="top">typedef struct <br class="typebreak"/>
__log4c_rollingpolicy&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rollingpolicy_8h.html#a1c3cf54a065c84e6b4f0c85cbe3832c9">log4c_rollingpolicy_t</a></td></tr>
<tr class="separator:a1c3cf54a065c84e6b4f0c85cbe3832c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9bfa38cb333223f222f20db356ef887b"><td class="memItemLeft" align="right" valign="top">typedef struct <br class="typebreak"/>
<a class="el" href="structlog4c__rollingpolicy__type.html">log4c_rollingpolicy_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rollingpolicy_8h.html#a9bfa38cb333223f222f20db356ef887b">log4c_rollingpolicy_type_t</a></td></tr>
<tr class="memdesc:a9bfa38cb333223f222f20db356ef887b"><td class="mdescLeft">&#160;</td><td class="mdescRight">log4c rollingpolicy type. Defines the interface a specific policy must provide to the rollingfile appender.  <a href="#a9bfa38cb333223f222f20db356ef887b">More...</a><br/></td></tr>
<tr class="separator:a9bfa38cb333223f222f20db356ef887b"><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:a88e95233aa56e0d483ef9d1da0304fcd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="rollingpolicy_8h.html#a1c3cf54a065c84e6b4f0c85cbe3832c9">log4c_rollingpolicy_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rollingpolicy_8h.html#a88e95233aa56e0d483ef9d1da0304fcd">log4c_rollingpolicy_get</a> (const char *policy_name)</td></tr>
<tr class="separator:a88e95233aa56e0d483ef9d1da0304fcd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4552312cd45db70028b6069edb467352"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="rollingpolicy_8h.html#a9bfa38cb333223f222f20db356ef887b">log4c_rollingpolicy_type_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rollingpolicy_8h.html#a4552312cd45db70028b6069edb467352">log4c_rollingpolicy_type_set</a> (const <a class="el" href="rollingpolicy_8h.html#a9bfa38cb333223f222f20db356ef887b">log4c_rollingpolicy_type_t</a> *a_type)</td></tr>
<tr class="separator:a4552312cd45db70028b6069edb467352"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5310f0cdfd17794745f6b6a7ae85f2c0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rollingpolicy_8h.html#a5310f0cdfd17794745f6b6a7ae85f2c0">log4c_rollingpolicy_set_udata</a> (<a class="el" href="rollingpolicy_8h.html#a1c3cf54a065c84e6b4f0c85cbe3832c9">log4c_rollingpolicy_t</a> *policyp, void *udatap)</td></tr>
<tr class="separator:a5310f0cdfd17794745f6b6a7ae85f2c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a867e9477f13549e456055ca024a841f8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rollingpolicy_8h.html#a867e9477f13549e456055ca024a841f8">log4c_rollingpolicy_init</a> (<a class="el" href="rollingpolicy_8h.html#a1c3cf54a065c84e6b4f0c85cbe3832c9">log4c_rollingpolicy_t</a> *policyp, rollingfile_udata_t *rfup)</td></tr>
<tr class="separator:a867e9477f13549e456055ca024a841f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7372761fe1545965eeeb858fe91e04d6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rollingpolicy_8h.html#a7372761fe1545965eeeb858fe91e04d6">log4c_rollingpolicy_fini</a> (<a class="el" href="rollingpolicy_8h.html#a1c3cf54a065c84e6b4f0c85cbe3832c9">log4c_rollingpolicy_t</a> *policyp)</td></tr>
<tr class="separator:a7372761fe1545965eeeb858fe91e04d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade90042327b4ea1a86fc70da2a883815"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rollingpolicy_8h.html#ade90042327b4ea1a86fc70da2a883815">log4c_rollingpolicy_is_triggering_event</a> (<a class="el" href="rollingpolicy_8h.html#a1c3cf54a065c84e6b4f0c85cbe3832c9">log4c_rollingpolicy_t</a> *policyp, const <a class="el" href="structlog4c__logging__event__t.html">log4c_logging_event_t</a> *evtp, long current_file_size)</td></tr>
<tr class="separator:ade90042327b4ea1a86fc70da2a883815"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29d3ef7d6828dd00968aeeec80812c80"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="rollingpolicy_8h.html#a9bfa38cb333223f222f20db356ef887b">log4c_rollingpolicy_type_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rollingpolicy_8h.html#a29d3ef7d6828dd00968aeeec80812c80">log4c_rollingpolicy_set_type</a> (<a class="el" href="rollingpolicy_8h.html#a1c3cf54a065c84e6b4f0c85cbe3832c9">log4c_rollingpolicy_t</a> *a_rollingpolicy, const <a class="el" href="rollingpolicy_8h.html#a9bfa38cb333223f222f20db356ef887b">log4c_rollingpolicy_type_t</a> *a_type)</td></tr>
<tr class="separator:a29d3ef7d6828dd00968aeeec80812c80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9e3bb1f8cafb54f5c7d1dff2069ee2b"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="rollingpolicy_8h.html#a9bfa38cb333223f222f20db356ef887b">log4c_rollingpolicy_type_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rollingpolicy_8h.html#ae9e3bb1f8cafb54f5c7d1dff2069ee2b">log4c_rollingpolicy_type_get</a> (const char *a_name)</td></tr>
<tr class="separator:ae9e3bb1f8cafb54f5c7d1dff2069ee2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af38354c5e45129069a55caa8e14ab7c3"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rollingpolicy_8h.html#af38354c5e45129069a55caa8e14ab7c3">log4c_rollingpolicy_get_udata</a> (const <a class="el" href="rollingpolicy_8h.html#a1c3cf54a065c84e6b4f0c85cbe3832c9">log4c_rollingpolicy_t</a> *policyp)</td></tr>
<tr class="separator:af38354c5e45129069a55caa8e14ab7c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5c79203416bec407211cec481cd9c74"><td class="memItemLeft" align="right" valign="top">rollingfile_udata_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rollingpolicy_8h.html#ad5c79203416bec407211cec481cd9c74">log4c_rollingpolicy_get_rfudata</a> (const <a class="el" href="rollingpolicy_8h.html#a1c3cf54a065c84e6b4f0c85cbe3832c9">log4c_rollingpolicy_t</a> *policyp)</td></tr>
<tr class="separator:ad5c79203416bec407211cec481cd9c74"><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 policy interface. Defines the interface for managing and providing rolling policies. </p>
<p>A rolling policy is used to confogure a rollingfile appender to tell it when to trigger a rolover event. </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a9d60b2e1decada3c0bdaa80b4d1f7d0a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ROLLINGPOLICY_ROLLOVER_ERR_CAN_LOG&#160;&#160;&#160;0x05</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Effect a rollover according to policyp on the given file stream. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">policyp</td><td>pointer to the rolling policy </td></tr>
    <tr><td class="paramname">fp</td><td>filestream to rollover. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero if successful, non-zero otherwise. The policy can return an indication that something went wrong but that the rollingfile appender can stull go ahead and log by returning an error code &lt;= ROLLINGPOLICY_ROLLOVER_ERR_CAN_LOG. Anything greater than means that the rolling file appender will not try to log it's message. </dd></dl>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="a1c3cf54a065c84e6b4f0c85cbe3832c9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct __log4c_rollingpolicy <a class="el" href="rollingpolicy_8h.html#a1c3cf54a065c84e6b4f0c85cbe3832c9">log4c_rollingpolicy_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>log4c rollingpolicy type </p>

</div>
</div>
<a class="anchor" id="a9bfa38cb333223f222f20db356ef887b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structlog4c__rollingpolicy__type.html">log4c_rollingpolicy_type</a>  <a class="el" href="rollingpolicy_8h.html#a9bfa38cb333223f222f20db356ef887b">log4c_rollingpolicy_type_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>log4c rollingpolicy type. Defines the interface a specific policy must provide to the rollingfile appender. </p>
<p>Attributes description:</p>
<ul>
<li><code>name</code> rollingpolicy type name </li>
<li><code>init()</code> init the rollingpolicy </li>
<li><code>is_triggering_event()</code> </li>
<li><code>rollover()</code> </li>
</ul>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a7372761fe1545965eeeb858fe91e04d6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int log4c_rollingpolicy_fini </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></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call the un initialization code of a rolling policy. This will call the fini routine of the particular rollingpolicy type to allow it to free up resources. If the call to fini in the rollingpolicy type fails then the rollingpolicy is not uninitialized. Try again later model... </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">policyp</td><td>pointer to the rolling policy </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="a88e95233aa56e0d483ef9d1da0304fcd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="rollingpolicy_8h.html#a1c3cf54a065c84e6b4f0c85cbe3832c9">log4c_rollingpolicy_t</a>* log4c_rollingpolicy_get </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>policy_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get a new rolling policy </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">policy_name</td><td>a name for the policy </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a new rolling policy, otherwise NULL. </dd></dl>

</div>
</div>
<a class="anchor" id="ad5c79203416bec407211cec481cd9c74"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">rollingfile_udata_t* log4c_rollingpolicy_get_rfudata </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="rollingpolicy_8h.html#a1c3cf54a065c84e6b4f0c85cbe3832c9">log4c_rollingpolicy_t</a> *&#160;</td>
          <td class="paramname"><em>policyp</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the rollingfile appender associated with this policy. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">policyp</td><td>pointer to the rolling policy </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to the rolling file appender associated with this policy </dd></dl>

</div>
</div>
<a class="anchor" id="af38354c5e45129069a55caa8e14ab7c3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* log4c_rollingpolicy_get_udata </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="rollingpolicy_8h.html#a1c3cf54a065c84e6b4f0c85cbe3832c9">log4c_rollingpolicy_t</a> *&#160;</td>
          <td class="paramname"><em>policyp</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the rolling policy configuration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">policyp</td><td>pointer to the rolling policy </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to the rolling policy configuration. </dd></dl>

</div>
</div>
<a class="anchor" id="a867e9477f13549e456055ca024a841f8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int log4c_rollingpolicy_init </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>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">rollingfile_udata_t *&#160;</td>
          <td class="paramname"><em>rfup</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call the initialization code of a rolling policy. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">policyp</td><td>pointer to the rolling policy </td></tr>
    <tr><td class="paramname">rfup</td><td>the rolling appender user data this policy is used with </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="ade90042327b4ea1a86fc70da2a883815"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int log4c_rollingpolicy_is_triggering_event </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>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structlog4c__logging__event__t.html">log4c_logging_event_t</a> *&#160;</td>
          <td class="paramname"><em>evtp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>current_file_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Determine if a logging event should trigger a rollover according to the given policy. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">policyp</td><td>pointer to the rolling policy </td></tr>
    <tr><td class="paramname">evtp</td><td>the logging event pointer. </td></tr>
    <tr><td class="paramname">current_file_size</td><td>the size of the current file being logged to. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>non-zero if rollover required, zero otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="a29d3ef7d6828dd00968aeeec80812c80"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="rollingpolicy_8h.html#a9bfa38cb333223f222f20db356ef887b">log4c_rollingpolicy_type_t</a>* log4c_rollingpolicy_set_type </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="rollingpolicy_8h.html#a1c3cf54a065c84e6b4f0c85cbe3832c9">log4c_rollingpolicy_t</a> *&#160;</td>
          <td class="paramname"><em>a_rollingpolicy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="rollingpolicy_8h.html#a9bfa38cb333223f222f20db356ef887b">log4c_rollingpolicy_type_t</a> *&#160;</td>
          <td class="paramname"><em>a_type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>sets the rolling policy type</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a_rollingpolicy</td><td>the log4c_rollingpolicy_t object </td></tr>
    <tr><td class="paramname">a_type</td><td>the new rollingpolicy type </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the previous appender type </dd></dl>

</div>
</div>
<a class="anchor" id="a5310f0cdfd17794745f6b6a7ae85f2c0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log4c_rollingpolicy_set_udata </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>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>udatap</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Configure a rolling policy with a specific policy. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">policyp</td><td>pointer to the rolling policy </td></tr>
    <tr><td class="paramname">udatap</td><td>a specific policy type, for example sizewin. </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="ae9e3bb1f8cafb54f5c7d1dff2069ee2b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="rollingpolicy_8h.html#a9bfa38cb333223f222f20db356ef887b">log4c_rollingpolicy_type_t</a>* log4c_rollingpolicy_type_get </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>a_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get a pointer to an existing rollingpolicy type.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a_name</td><td>the name of the rollingpolicy type to return. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer to an existing rollingpolicy type, or NULL if no rollingpolicy type with the specified name exists. </dd></dl>

</div>
</div>
<a class="anchor" id="a4552312cd45db70028b6069edb467352"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="rollingpolicy_8h.html#a9bfa38cb333223f222f20db356ef887b">log4c_rollingpolicy_type_t</a>* log4c_rollingpolicy_type_set </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="rollingpolicy_8h.html#a9bfa38cb333223f222f20db356ef887b">log4c_rollingpolicy_type_t</a> *&#160;</td>
          <td class="paramname"><em>a_type</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Use this function to register a rollingpolicy type with log4c. Once this is done you may refer to this type by name both programmatically and in the log4c configuration file.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a_type</td><td>a pointer to the new rollingpolicy type to register. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer to the previous rollingpolicy type of same name.</dd></dl>
<p>Example code fragment: </p>
<div class="fragment"><div class="line"><span class="keyword">const</span> <a class="code" href="structlog4c__rollingpolicy__type.html" title="log4c rollingpolicy type. Defines the interface a specific policy must provide to the rollingfile app...">log4c_rollingpolicy_type_t</a> log4c_rollingpolicy_type_sizewin = {</div>
<div class="line">  <span class="stringliteral">&quot;sizewin&quot;</span>,</div>
<div class="line">  sizewin_init,</div>
<div class="line">  sizewin_is_triggering_event,</div>
<div class="line">  sizewin_rollover</div>
<div class="line">};</div>
<div class="line"></div>
<div class="line">log4c_rollingpolicy_type_set(&amp;log4c_rollingpolicy_type_sizewin);</div>
</div><!-- fragment --> 
</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>