📄 classlog4cpp_1_1appenderskeleton.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>log4cpp: log4cpp::AppenderSkeleton Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.2 --><div class="qindex"><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">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div><div class="nav"><a class="el" href="namespacelog4cpp.html">log4cpp</a>::<a class="el" href="classlog4cpp_1_1AppenderSkeleton.html">AppenderSkeleton</a></div><h1>log4cpp::AppenderSkeleton Class Reference</h1><a class="el" href="classlog4cpp_1_1AppenderSkeleton.html">AppenderSkeleton</a> is a helper class, simplifying implementation of Appenders: it already takes care of handling of Thresholds and Filters. <a href="#_details">More...</a><p><code>#include <<a class="el" href="AppenderSkeleton_8hh-source.html">AppenderSkeleton.hh</a>></code><p>Inheritance diagram for log4cpp::AppenderSkeleton:<p><center><img src="classlog4cpp_1_1AppenderSkeleton__inherit__graph.png" border="0" usemap="#log4cpp_1_1AppenderSkeleton__inherit__map" alt="Inheritance graph"></center><map name="log4cpp_1_1AppenderSkeleton__inherit__map"><area href="classlog4cpp_1_1AbortAppender.html" shape="rect" coords="8,158,173,182" alt=""><area href="classlog4cpp_1_1IdsaAppender.html" shape="rect" coords="197,158,357,182" alt=""><area href="classlog4cpp_1_1LayoutAppender.html" shape="rect" coords="381,158,554,182" alt=""><area href="classlog4cpp_1_1NTEventLogAppender.html" shape="rect" coords="578,158,786,182" alt=""><area href="classlog4cpp_1_1Appender.html" shape="rect" coords="305,9,438,33" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for log4cpp::AppenderSkeleton:<p><center><img src="classlog4cpp_1_1AppenderSkeleton__coll__graph.png" border="0" usemap="#log4cpp_1_1AppenderSkeleton__coll__map" alt="Collaboration graph"></center><map name="log4cpp_1_1AppenderSkeleton__coll__map"><area href="classlog4cpp_1_1Appender.html" shape="rect" coords="8,9,141,33" alt=""><area href="classlog4cpp_1_1Filter.html" shape="rect" coords="165,9,269,33" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classlog4cpp_1_1AppenderSkeleton-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1AppenderSkeleton.html#a0">~AppenderSkeleton</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor for <a class="el" href="classlog4cpp_1_1AppenderSkeleton.html">AppenderSkeleton</a>. <a href="#a0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1AppenderSkeleton.html#a1">doAppend</a> (const <a class="el" href="structlog4cpp_1_1LoggingEvent.html">LoggingEvent</a> &event)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Log in <a class="el" href="classlog4cpp_1_1Appender.html">Appender</a> specific way. <a href="#a1"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1AppenderSkeleton.html#a2">reopen</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Reopens the output destination of this <a class="el" href="classlog4cpp_1_1Appender.html">Appender</a>, e.g. <a href="#a2"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1AppenderSkeleton.html#a3">close</a> ()=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Release any resources allocated within the appender such as file handles, network connections, etc. <a href="#a3"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1AppenderSkeleton.html#a4">requiresLayout</a> () const =0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Check if the appender uses a layout. <a href="#a4"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1AppenderSkeleton.html#a5">setLayout</a> (<a class="el" href="classlog4cpp_1_1Layout.html">Layout</a> *layout)=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Set the <a class="el" href="classlog4cpp_1_1Layout.html">Layout</a> for this appender. <a href="#a5"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1AppenderSkeleton.html#a6">setThreshold</a> (<a class="el" href="classlog4cpp_1_1Priority.html#w0">Priority::Value</a> priority)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Set the threshold priority of this <a class="el" href="classlog4cpp_1_1Appender.html">Appender</a>. <a href="#a6"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classlog4cpp_1_1Priority.html#w0">Priority::Value</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1AppenderSkeleton.html#a7">getThreshold</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Get the threshold priority of this <a class="el" href="classlog4cpp_1_1Appender.html">Appender</a>. <a href="#a7"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1AppenderSkeleton.html#a8">setFilter</a> (<a class="el" href="classlog4cpp_1_1Filter.html">Filter</a> *filter)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Set a <a class="el" href="classlog4cpp_1_1Filter.html">Filter</a> for this appender. <a href="#a8"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classlog4cpp_1_1Filter.html">Filter</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1AppenderSkeleton.html#a9">getFilter</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Get the <a class="el" href="classlog4cpp_1_1Filter.html">Filter</a> for this appender. <a href="#a9"></a><br></td></tr><tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1AppenderSkeleton.html#b0">AppenderSkeleton</a> (const std::string &name)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor for <a class="el" href="classlog4cpp_1_1AppenderSkeleton.html">AppenderSkeleton</a>. <a href="#b0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1AppenderSkeleton.html#b1">_append</a> (const <a class="el" href="structlog4cpp_1_1LoggingEvent.html">LoggingEvent</a> &event)=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Log in <a class="el" href="classlog4cpp_1_1Appender.html">Appender</a> specific way. <a href="#b1"></a><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2><a class="el" href="classlog4cpp_1_1AppenderSkeleton.html">AppenderSkeleton</a> is a helper class, simplifying implementation of Appenders: it already takes care of handling of Thresholds and Filters. <p><hr><h2>Constructor & Destructor Documentation</h2><a class="anchor" name="b0" doxytag="log4cpp::AppenderSkeleton::AppenderSkeleton"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">log4cpp::AppenderSkeleton::AppenderSkeleton </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const std::string & </td> <td class="mdname1" valign="top" nowrap> <em>name</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [protected]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Constructor for <a class="el" href="classlog4cpp_1_1AppenderSkeleton.html">AppenderSkeleton</a>. <p>Will only be used in <a class="el" href="classlog4cpp_1_1Appender.html#e0">getAppender()</a> (and in derived classes of course). <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>The name of this <a class="el" href="classlog4cpp_1_1Appender.html">Appender</a>. </td></tr> </table></dl> </td> </tr></table><a class="anchor" name="a0" doxytag="log4cpp::AppenderSkeleton::~AppenderSkeleton"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">log4cpp::AppenderSkeleton::~AppenderSkeleton </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> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Destructor for <a class="el" href="classlog4cpp_1_1AppenderSkeleton.html">AppenderSkeleton</a>. <p> </td> </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="b1" doxytag="log4cpp::AppenderSkeleton::_append"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">virtual void log4cpp::AppenderSkeleton::_append </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="structlog4cpp_1_1LoggingEvent.html">LoggingEvent</a> & </td> <td class="mdname1" valign="top" nowrap> <em>event</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [protected, pure virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Log in <a class="el" href="classlog4cpp_1_1Appender.html">Appender</a> specific way. <p>Subclasses of <a class="el" href="classlog4cpp_1_1Appender.html">Appender</a> should implement this method to perform actual logging. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>event</em> </td><td>The <a class="el" href="structlog4cpp_1_1LoggingEvent.html">LoggingEvent</a> to log. </td></tr> </table></dl><p>Implemented in <a class="el" href="classlog4cpp_1_1AbortAppender.html#b0">log4cpp::AbortAppender</a>, <a class="el" href="classlog4cpp_1_1FileAppender.html#b0">log4cpp::FileAppender</a>, <a class="el" href="classlog4cpp_1_1IdsaAppender.html#b1">log4cpp::IdsaAppender</a>, <a class="el" href="classlog4cpp_1_1NTEventLogAppender.html#b7">log4cpp::NTEventLogAppender</a>, <a class="el" href="classlog4cpp_1_1OstreamAppender.html#b0">log4cpp::OstreamAppender</a>, <a class="el" href="classlog4cpp_1_1RemoteSyslogAppender.html#b1">log4cpp::RemoteSyslogAppender</a>, <a class="el" href="classlog4cpp_1_1RollingFileAppender.html#b0">log4cpp::RollingFileAppender</a>, <a class="el" href="classlog4cpp_1_1StringQueueAppender.html#b0">log4cpp::StringQueueAppender</a>, <a class="el" href="classlog4cpp_1_1SyslogAppender.html#b1">log4cpp::SyslogAppender</a>, and <a class="el" href="classlog4cpp_1_1Win32DebugAppender.html#b0">log4cpp::Win32DebugAppender</a>. </td> </tr></table><a class="anchor" name="a3" doxytag="log4cpp::AppenderSkeleton::close"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">virtual void log4cpp::AppenderSkeleton::close </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> [pure virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Release any resources allocated within the appender such as file handles, network connections, etc. <p><p>Implements <a class="el" href="classlog4cpp_1_1Appender.html#a3">log4cpp::Appender</a>.<p>Implemented in <a class="el" href="classlog4cpp_1_1AbortAppender.html#a3">log4cpp::AbortAppender</a>, <a class="el" href="classlog4cpp_1_1FileAppender.html#a4">log4cpp::FileAppender</a>, <a class="el" href="classlog4cpp_1_1IdsaAppender.html#a3">log4cpp::IdsaAppender</a>, <a class="el" href="classlog4cpp_1_1NTEventLogAppender.html#a3">log4cpp::NTEventLogAppender</a>, <a class="el" href="classlog4cpp_1_1OstreamAppender.html#a3">log4cpp::OstreamAppender</a>, <a class="el" href="classlog4cpp_1_1RemoteSyslogAppender.html#a3">log4cpp::RemoteSyslogAppender</a>, <a class="el" href="classlog4cpp_1_1StringQueueAppender.html#a3">log4cpp::StringQueueAppender</a>, <a class="el" href="classlog4cpp_1_1SyslogAppender.html#a3">log4cpp::SyslogAppender</a>, and <a class="el" href="classlog4cpp_1_1Win32DebugAppender.html#a2">log4cpp::Win32DebugAppender</a>. </td> </tr></table><a class="anchor" name="a1" doxytag="log4cpp::AppenderSkeleton::doAppend"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void log4cpp::AppenderSkeleton::doAppend </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="structlog4cpp_1_1LoggingEvent.html">LoggingEvent</a> & </td> <td class="mdname1" valign="top" nowrap> <em>event</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Log in <a class="el" href="classlog4cpp_1_1Appender.html">Appender</a> specific way. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>event</em> </td><td>The <a class="el" href="structlog4cpp_1_1LoggingEvent.html">LoggingEvent</a> to log. </td></tr> </table></dl><p>Implements <a class="el" href="classlog4cpp_1_1Appender.html#a1">log4cpp::Appender</a>. </td> </tr></table><a class="anchor" name="a9" doxytag="log4cpp::AppenderSkeleton::getFilter"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -