📄 classpsystemlog.html
字号:
<!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>PSystemLog class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>PSystemLog Class Reference</h1><code>#include <<a class="el" href="svcproc_8h-source.html">svcproc.h</a>></code><p><p>Inheritance diagram for PSystemLog:<p><center><img src="classPSystemLog.png" usemap="#PSystemLog_map" border="0" alt=""></center><map name="PSystemLog_map"><area href="classPObject.html" alt="PObject" shape="rect" coords="0,0,81,24"></map><a href="classPSystemLog-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Construction</h2></td></tr><tr><td nowrap align=right valign=top>enum </td><td valign=bottom><a class="el" href="classPSystemLog.html#z401_0">Level</a> { <br> <a class="el" href="classPSystemLog.html#z401_0s0">StdError</a> = -1, <a class="el" href="classPSystemLog.html#z401_0s1">Fatal</a>, <a class="el" href="classPSystemLog.html#z401_0s2">Error</a>, <a class="el" href="classPSystemLog.html#z401_0s3">Warning</a>, <br> <a class="el" href="classPSystemLog.html#z401_0s4">Info</a>, <a class="el" href="classPSystemLog.html#z401_0s5">Debug</a>, <a class="el" href="classPSystemLog.html#z401_0s6">Debug2</a>, <a class="el" href="classPSystemLog.html#z401_0s7">Debug3</a>, <br> <a class="el" href="classPSystemLog.html#z401_0s8">Debug4</a>, <a class="el" href="classPSystemLog.html#z401_0s9">Debug5</a>, <a class="el" href="classPSystemLog.html#z401_0s10">Debug6</a>, <a class="el" href="classPSystemLog.html#z401_0s11">NumLogLevels</a><br> }</td></tr><tr><td> </td><td><font size=-1><em>define the different error log levels</em> <a href="#z401_0">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPSystemLog.html#z401_1">PSystemLog</a> (<a class="el" href="classPSystemLog.html#z401_0">Level</a> level)</td></tr><tr><td> </td><td><font size=-1><em>Create a system log stream.</em> <a href="#z401_1"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPSystemLog.html#z401_2">~PSystemLog</a> ()</td></tr><tr><td> </td><td><font size=-1><em>Destroy the string stream, deleting the stream buffer.</em> <a href="#z401_2"></a><em></em></font><br><br></td></tr><tr><td colspan=2><br><h2>Public Types</h2></td></tr><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td colspan="2"><div class="groupHeader">Miscellaneous functions</div></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classPSystemLog.html#z405_0">SetLevel</a> (<a class="el" href="classPSystemLog.html#z401_0">Level</a> level)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPSystemLog.html#z401_0">Level</a> </td><td valign=bottom><a class="el" href="classPSystemLog.html#z405_1">GetLevel</a> () const</td></tr><tr><td colspan=2><br><h2>Static Public Methods</h2></td></tr><tr><td colspan="2"><div class="groupHeader">Output functions</div></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classPSystemLog.html#z403_0">Output</a> (<a class="el" href="classPSystemLog.html#z401_0">Level</a> level, const char *msg)</td></tr><tr><td colspan=2><br><h2>Friends</h2></td></tr><tr><td nowrap align=right valign=top>class </td><td valign=bottom><a class="el" href="classPSystemLog.html#l0">Buffer</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class abstracts the operating system dependent error logging facility. To send messages to the system error log, the PSYSTEMLOG macro should be used. <p><hr><h2>Member Enumeration Documentation</h2><a name="z401_0" doxytag="PSystemLog::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"> enum PSystemLog::Level </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>define the different error log levels<p><dl compact><dt><b>Enumeration values: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em><a name="z401_0s0" doxytag="StdError"></a><em>StdError</em></em> </td><td>Log from standard error stream.</td></tr><tr><td valign=top><em><a name="z401_0s1" doxytag="Fatal"></a><em>Fatal</em></em> </td><td>Log a fatal error.</td></tr><tr><td valign=top><em><a name="z401_0s2" doxytag="Error"></a><em>Error</em></em> </td><td>Log a non-fatal error.</td></tr><tr><td valign=top><em><a name="z401_0s3" doxytag="Warning"></a><em>Warning</em></em> </td><td>Log a warning.</td></tr><tr><td valign=top><em><a name="z401_0s4" doxytag="Info"></a><em>Info</em></em> </td><td>Log general information.</td></tr><tr><td valign=top><em><a name="z401_0s5" doxytag="Debug"></a><em>Debug</em></em> </td><td>Log debugging information.</td></tr><tr><td valign=top><em><a name="z401_0s6" doxytag="Debug2"></a><em>Debug2</em></em> </td><td>Log more debugging information.</td></tr><tr><td valign=top><em><a name="z401_0s7" doxytag="Debug3"></a><em>Debug3</em></em> </td><td>Log even more debugging information.</td></tr><tr><td valign=top><em><a name="z401_0s8" doxytag="Debug4"></a><em>Debug4</em></em> </td><td>Log a lot of debugging information.</td></tr><tr><td valign=top><em><a name="z401_0s9" doxytag="Debug5"></a><em>Debug5</em></em> </td><td>Log a real lot of debugging information.</td></tr><tr><td valign=top><em><a name="z401_0s10" doxytag="Debug6"></a><em>Debug6</em></em> </td><td>Log a bucket load of debugging information.</td></tr><tr><td valign=top><em><a name="z401_0s11" doxytag="NumLogLevels"></a><em>NumLogLevels</em></em> </td><td></td></tr></table></dl> </td> </tr></table><hr><h2>Constructor & Destructor Documentation</h2><a name="z401_1" doxytag="PSystemLog::PSystemLog"></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"> PSystemLog::PSystemLog </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classPSystemLog.html#z401_0">Level</a> </td> <td class="mdname1" valign="top" nowrap> <em>level</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a system log stream.<p><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>level</em> </td><td>only messages at this level or higher will be logged </td></tr></table></dl> </td> </tr></table><a name="z401_2" doxytag="PSystemLog::~PSystemLog"></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"> PSystemLog::~PSystemLog </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Destroy the string stream, deleting the stream buffer.<p> </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="z405_1" doxytag="PSystemLog::GetLevel"></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"> <a class="el" href="classPSystemLog.html#z401_0">Level</a> PSystemLog::GetLevel </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const<code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get the current level for logging.<p><dl compact><dt><b>Returns: </b></dt><dd> Log level. </dl> </td> </tr></table><a name="z403_0" doxytag="PSystemLog::Output"></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 PSystemLog::Output </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classPSystemLog.html#z401_0">Level</a> </td> <td class="mdname" nowrap> <em>level</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const char * </td> <td class="mdname" nowrap> <em>msg</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Log an error into the system log. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>msg</em> </td><td>Log level for this log message. Message to be logged </td></tr></table></dl> </td> </tr></table><a name="z405_0" doxytag="PSystemLog::SetLevel"></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 PSystemLog::SetLevel </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classPSystemLog.html#z401_0">Level</a> </td> <td class="mdname1" valign="top" nowrap> <em>level</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Set the level at which errors are logged. Only messages higher than or equal to the specified level will be logged. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>level</em> </td><td>New log level </td></tr></table></dl> </td> </tr></table><hr><h2>Friends And Related Function Documentation</h2><a name="l0" doxytag="PSystemLog::Buffer"></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"> friend class Buffer<code> [friend]</code> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><hr>The documentation for this class was generated from the following file:<ul><li><a class="el" href="svcproc_8h-source.html">svcproc.h</a></ul><hr><address style="align: right;"><small>Generated on Wed Sep 29 22:44:20 2004 for PWLib by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -