Sophie

Sophie

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

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_stream.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="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">appender_type_stream.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Log4c stream 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/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for appender_type_stream.h:</div>
<div class="dyncontent">
<div class="center"><img src="appender__type__stream_8h__incl.png" border="0" usemap="#appender__type__stream_8h" alt=""/></div>
<map name="appender__type__stream_8h" id="appender__type__stream_8h">
<area shape="rect" id="node5" href="appender_8h.html" title="Implement this interface for your own strategies for printing log statements." alt="" coords="94,80,215,107"/><area shape="rect" id="node8" href="layout_8h.html" title="Interface for user specific layout format of log4c_logging_event events." alt="" coords="138,155,240,181"/><area shape="rect" id="node11" href="logging__event_8h.html" title="the internal representation of logging events." alt="" coords="161,229,308,256"/><area shape="rect" id="node14" href="buffer_8h.html" title="log4c buffer" alt="" coords="376,304,477,331"/><area shape="rect" id="node19" href="location__info_8h.html" title="The internal representation of caller location information." alt="" coords="211,304,352,331"/></map>
</div>
</div>
<p><a href="appender__type__stream_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="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:abaa603ad9d39a0ad1b5db520c26af0c8"><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__stream_8h.html#abaa603ad9d39a0ad1b5db520c26af0c8">log4c_appender_type_stream</a></td></tr>
<tr class="separator:abaa603ad9d39a0ad1b5db520c26af0c8"><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 stream appender interface. </p>
<p>The stream appender uses a file handle <code>FILE*</code> for logging. The appender's name is used as the file name which will be opened at first log. An appender can also be associated to an opened file handle using the <a class="el" href="appender_8h.html#a424964ad91214c56ae738d158a97ea54">log4c_appender_set_udata()</a> method to update the appender user data field. In this last case, the appender name has no meaning. 2 default stream appenders are defined: <code>"stdout"</code> and <code>"stderr"</code>.</p>
<p>The following examples shows how to define and use stream appenders.</p>
<ul>
<li>the simple way <div class="fragment"><div class="line"><a class="code" href="appender_8h.html#ab9a6df639c26566a4576233dfcc21b55">log4c_appender_t</a>* myappender;</div>
<div class="line"></div>
<div class="line">myappender = log4c_appender_get(<span class="stringliteral">&quot;myfile.log&quot;</span>);</div>
<div class="line">log4c_appender_set_type(myappender, &amp;log4c_appender_type_stream);</div>
</div><!-- fragment --></li>
</ul>
<ul>
<li>the sophisticated way <div class="fragment"><div class="line"><a class="code" href="appender_8h.html#ab9a6df639c26566a4576233dfcc21b55">log4c_appender_t</a>* myappender;</div>
<div class="line"></div>
<div class="line">myappender = log4c_appender_get(<span class="stringliteral">&quot;myappender&quot;</span>);</div>
<div class="line">   </div>
<div class="line">log4c_appender_set_type(myappender, &amp;log4c_appender_type_stream);</div>
<div class="line">log4c_appender_set_udata(myappender, fopen(<span class="stringliteral">&quot;myfile.log&quot;</span>, <span class="stringliteral">&quot;w&quot;</span>));</div>
</div><!-- fragment --> </li>
</ul>
</div><h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="abaa603ad9d39a0ad1b5db520c26af0c8"></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_stream</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Stream 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>