Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 68d373e54fb21da3730c08bede406633 > files > 322

libCommonC++1.9_3-devel-1.9.4-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Slog class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.2.10 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
<hr><h1>Slog  Class Reference</h1>The slog class is used to stream messages to the system logging fascility. system logging fascility class. 
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="slog_8h-source.html">slog.h</a>&gt;</code>
<p>
<p>Inheritance diagram for Slog::
<p><center><img src="class_slog.gif" usemap="#Slog_map" border="0"></center>
<map name="Slog_map">
<area href="classstd_1_1streambuf.html" alt="std::streambuf" shape="rect" coords="0,0,89,24">
<area href="classstd_1_1ostream.html" alt="std::ostream" shape="rect" coords="99,0,188,24">
</map>
<a href="class_slog-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="class_slog.html#a0">Slog</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="class_slog.html#a1">~Slog</a> ()</td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="class_slog.html#a2">overflow</a> (int c)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="class_slog.html#a3">close</a> (void)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="class_slog.html#a4">open</a> (const char *ident, <a class="el" href="slog_8h.html#a16">slog_class_t</a> grp=SLOG_USER)</td></tr>
<tr><td nowrap align=right valign=top>Slog &amp;&nbsp;</td><td valign=bottom><a class="el" href="class_slog.html#a5">operator()</a> (const char *ident, <a class="el" href="slog_8h.html#a16">slog_class_t</a> grp=SLOG_USER, <a class="el" href="slog_8h.html#a17">slog_level_t</a> level=SLOG_ERROR)</td></tr>
<tr><td nowrap align=right valign=top>Slog &amp;&nbsp;</td><td valign=bottom><a class="el" href="class_slog.html#a6">operator()</a> (<a class="el" href="slog_8h.html#a17">slog_level_t</a> level, <a class="el" href="slog_8h.html#a16">slog_class_t</a>=SLOG_DEFAULT)</td></tr>
<tr><td nowrap align=right valign=top>Slog &amp;&nbsp;</td><td valign=bottom><a class="el" href="class_slog.html#a7">operator()</a> (void)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="class_slog.html#a8">level</a> (<a class="el" href="slog_8h.html#a17">slog_level_t</a> enable)</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The slog class is used to stream messages to the system logging fascility. system logging fascility class.
<p>
A default <code>slog</code> object is used to avoid confusion with the native syslog fascility and to imply a logical relationship to the C++ <code>clog()</code>.
<p>
The key difference is that the <code>slog</code> object sends it's output to the system logging daemon (typically syslogd) rather than through stderr. <code>slog</code> can be streamed with the <code>&lt;&lt;</code> operator just like <code>clog</code>; a default  slog object is pre-initialized, and you stream character data to it.
<p>
The <code>slog</code> allows one to specify logging levels and other properties through the <code>()</code> operators. Hence, once can do:
<p>
<code><pre>
 slog("mydaemon", SLOG_DAEMON, SLOG_EMERGENCY) &lt;&lt; I just died &lt;&lt; endl; </pre></code>
<p>
or things like:
<p>
<code><pre>
 slog("mydaemon", SLOG_DAEMON); 
 slog(SLOG_INFO) &lt;&lt; "daemon initalized" &lt;&lt; endl; </pre></code>
<p>
The intent is to be as common-place and as convenient to use as the stderr based clog facility found in C++, and this is especially useful for C++ daemons.
<p>
<dl compact><dt><b>
Author: </b><dd>
David Sugar &lt;<a href="mailto:dyfet@ostel.com">dyfet@ostel.com</a>&gt; </dl>
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="Slog::Slog"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> Slog::Slog </td>
          <td class="md">(&nbsp;</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a1" doxytag="Slog::~Slog"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual Slog::~Slog </td>
          <td class="md">(&nbsp;</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="a3" doxytag="Slog::close"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void Slog::close </td>
          <td class="md">(&nbsp;</td>
          <td class="md">void</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a8" doxytag="Slog::level"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void Slog::level </td>
          <td class="md">(&nbsp;</td>
          <td class="md"><a class="el" href="slog_8h.html#a17">slog_level_t</a></td>
          <td class="mdname1">&nbsp; <em>enable</em>          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a4" doxytag="Slog::open"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void Slog::open </td>
          <td class="md">(&nbsp;</td>
          <td class="md">const char *</td>
          <td class="mdname">&nbsp; <em>ident</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md"><a class="el" href="slog_8h.html#a16">slog_class_t</a></td>
          <td class="mdname">&nbsp; <em>grp</em> = SLOG_USER</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a7" doxytag="Slog::operator()"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> Slog&amp; Slog::operator() </td>
          <td class="md">(&nbsp;</td>
          <td class="md">void</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a6" doxytag="Slog::operator()"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> Slog&amp; Slog::operator() </td>
          <td class="md">(&nbsp;</td>
          <td class="md"><a class="el" href="slog_8h.html#a17">slog_level_t</a></td>
          <td class="mdname">&nbsp; <em>level</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md"><a class="el" href="slog_8h.html#a16">slog_class_t</a></td>
          <td class="mdname">&nbsp; = SLOG_DEFAULT</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a5" doxytag="Slog::operator()"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> Slog&amp; Slog::operator() </td>
          <td class="md">(&nbsp;</td>
          <td class="md">const char *</td>
          <td class="mdname">&nbsp; <em>ident</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md"><a class="el" href="slog_8h.html#a16">slog_class_t</a></td>
          <td class="mdname">&nbsp; <em>grp</em> = SLOG_USER, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md"><a class="el" href="slog_8h.html#a17">slog_level_t</a></td>
          <td class="mdname">&nbsp; <em>level</em> = SLOG_ERROR</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a2" doxytag="Slog::overflow"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int Slog::overflow </td>
          <td class="md">(&nbsp;</td>
          <td class="md">int</td>
          <td class="mdname1">&nbsp; <em>c</em>          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="slog_8h-source.html">slog.h</a></ul>
<hr><address><small>Generated at Tue Nov 20 13:28:50 2001 for CommonC++ by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.gif" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.10 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
 &copy;&nbsp;1997-2001</small></address>
</body>
</html>