📄 classlog4cpp_1_1category.html
字号:
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classlog4cpp_1_1Priority.html#w0">Priority::Value</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1Category.html#e2">getRootPriority</a> () throw ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Get the priority of the <code>root</code> <a class="el" href="classlog4cpp_1_1Category.html">Category</a>. <a href="#e2"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classlog4cpp_1_1Category.html">Category</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1Category.html#e3">getInstance</a> (const std::string &name)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Instantiate a <a class="el" href="classlog4cpp_1_1Category.html">Category</a> with name <code>name</code>. <a href="#e3"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classlog4cpp_1_1Category.html">Category</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1Category.html#e4">exists</a> (const std::string &name)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">If the named category exists (in the default hierarchy) then it returns a reference to the category, otherwise it returns NULL. <a href="#e4"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static std::vector< <a class="el" href="classlog4cpp_1_1Category.html">Category</a> * > * </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1Category.html#e5">getCurrentCategories</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Returns all the currently defined categories as a vector of <a class="el" href="classlog4cpp_1_1Category.html">Category</a> pointers. <a href="#e5"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1Category.html#e6">shutdown</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">This method will remove all Appenders from Categories.XXX. <a href="#e6"></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_1Category.html#b0">Category</a> (const std::string &name, <a class="el" href="classlog4cpp_1_1Category.html">Category</a> *parent, <a class="el" href="classlog4cpp_1_1Priority.html#w0">Priority::Value</a> priority=Priority::NOTSET)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <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_1Category.html#b1">_logUnconditionally</a> (<a class="el" href="classlog4cpp_1_1Priority.html#w0">Priority::Value</a> priority, const char *format, va_list arguments) throw ()</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_1Category.html#b2">_logUnconditionally2</a> (<a class="el" href="classlog4cpp_1_1Priority.html#w0">Priority::Value</a> priority, const std::string &message) throw ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Unconditionally log a message with the specified priority. <a href="#b2"></a><br></td></tr><tr><td colspan="2"><br><h2>Friends</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1Category.html#n0">HierarchyMaintainer</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This is the central class in the log4j package. <p>One of the distintive features of log4j (and hence <a class="el" href="namespacelog4cpp.html">log4cpp</a>) are hierarchal categories and their evaluation. <p><hr><h2>Constructor & Destructor Documentation</h2><a class="anchor" name="a0" doxytag="log4cpp::Category::~Category"></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::Category::~Category </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_1Category.html">Category</a>. <p> </td> </tr></table><a class="anchor" name="b0" doxytag="log4cpp::Category::Category"></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::Category::Category </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const std::string & </td> <td class="mdname" nowrap> <em>name</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="classlog4cpp_1_1Category.html">Category</a> * </td> <td class="mdname" nowrap> <em>parent</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="classlog4cpp_1_1Priority.html#w0">Priority::Value</a> </td> <td class="mdname" nowrap> <em>priority</em> = <code>Priority::NOTSET</code></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [protected]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Constructor. <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>name</em> </td><td>the fully qualified name of this <a class="el" href="classlog4cpp_1_1Category.html">Category</a> </td></tr> <tr><td valign="top"></td><td valign="top"><em>parent</em> </td><td>the parent of this parent, or NULL for the root <a class="el" href="classlog4cpp_1_1Category.html">Category</a> </td></tr> <tr><td valign="top"></td><td valign="top"><em>priority</em> </td><td>the priority for this <a class="el" href="classlog4cpp_1_1Category.html">Category</a>. Defaults to <a class="el" href="classlog4cpp_1_1Priority.html#w11w10">Priority::NOTSET</a> </td></tr> </table></dl> </td> </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="b1" doxytag="log4cpp::Category::_logUnconditionally"></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::Category::_logUnconditionally </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classlog4cpp_1_1Priority.html#w0">Priority::Value</a> </td> <td class="mdname" nowrap> <em>priority</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const char * </td> <td class="mdname" nowrap> <em>format</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>va_list </td> <td class="mdname" nowrap> <em>arguments</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"> throw ()<code> [protected, virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p> </td> </tr></table><a class="anchor" name="b2" doxytag="log4cpp::Category::_logUnconditionally2"></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::Category::_logUnconditionally2 </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classlog4cpp_1_1Priority.html#w0">Priority::Value</a> </td> <td class="mdname" nowrap> <em>priority</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const std::string & </td> <td class="mdname" nowrap> <em>message</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"> throw ()<code> [protected, virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Unconditionally log a message with the specified priority. <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>priority</em> </td><td>The priority of this log message. </td></tr> <tr><td valign="top"></td><td valign="top"><em>message</em> </td><td>string to write in the log file </td></tr> </table></dl><p>Reimplemented in <a class="el" href="classlog4cpp_1_1FixedContextCategory.html#b0">log4cpp::FixedContextCategory</a>. </td> </tr></table><a class="anchor" name="a7" doxytag="log4cpp::Category::addAppender"></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::Category::addAppender </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classlog4cpp_1_1Appender.html">Appender</a> & </td> <td class="mdname1" valign="top" nowrap> <em>appender</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -