<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>log4cpp: Category.hh Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.9 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <h1>Category.hh</h1><a href="Category_8hh.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment"> * Category.hh</span> <a name="l00003"></a>00003 <span class="comment"> *</span> <a name="l00004"></a>00004 <span class="comment"> * Copyright 2000, LifeLine Networks BV (www.lifeline.nl). All rights reserved.</span> <a name="l00005"></a>00005 <span class="comment"> * Copyright 2000, Bastiaan Bakker. All rights reserved.</span> <a name="l00006"></a>00006 <span class="comment"> *</span> <a name="l00007"></a>00007 <span class="comment"> * See the COPYING file for the terms of usage and distribution.</span> <a name="l00008"></a>00008 <span class="comment"> */</span> <a name="l00009"></a>00009 <a name="l00010"></a>00010 <span class="preprocessor">#ifndef _LOG4CPP_CATEGORY_HH</span> <a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define _LOG4CPP_CATEGORY_HH</span> <a name="l00012"></a>00012 <span class="preprocessor"></span> <a name="l00013"></a>00013 <span class="preprocessor">#include <<a class="code" href="Portability_8hh.html">log4cpp/Portability.hh</a>></span> <a name="l00014"></a>00014 <span class="preprocessor">#include <<a class="code" href="Appender_8hh.html">log4cpp/Appender.hh</a>></span> <a name="l00015"></a>00015 <span class="preprocessor">#include <<a class="code" href="LoggingEvent_8hh.html">log4cpp/LoggingEvent.hh</a>></span> <a name="l00016"></a>00016 <span class="preprocessor">#include <<a class="code" href="Priority_8hh.html">log4cpp/Priority.hh</a>></span> <a name="l00017"></a>00017 <span class="preprocessor">#include <<a class="code" href="CategoryStream_8hh.html">log4cpp/CategoryStream.hh</a>></span> <a name="l00018"></a>00018 <span class="preprocessor">#include <<a class="code" href="Threading_8hh.html">log4cpp/threading/Threading.hh</a>></span> <a name="l00019"></a>00019 <span class="preprocessor">#include <log4cpp/convenience.h></span> <a name="l00020"></a>00020 <a name="l00021"></a>00021 <span class="preprocessor">#include <map></span> <a name="l00022"></a>00022 <span class="preprocessor">#include <vector></span> <a name="l00023"></a>00023 <span class="preprocessor">#include <cstdarg></span> <a name="l00024"></a>00024 <span class="preprocessor">#include <stdexcept></span> <a name="l00025"></a>00025 <a name="l00026"></a>00026 <span class="keyword">namespace </span>log4cpp { <a name="l00027"></a>00027 <a name="l00033"></a><a class="code" href="classlog4cpp_1_1Category.html">00033</a> <span class="keyword">class </span><a class="code" href="Export_8hh.html#30f9ff9641fa394781f52398a8312437">LOG4CPP_EXPORT</a> <a class="code" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a> { <a name="l00034"></a><a class="code" href="classlog4cpp_1_1Category.html#09f128c878c5735c0802cfbf132b6b9d">00034</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classlog4cpp_1_1HierarchyMaintainer.html" title="HierarchyMaintainer is an internal log4cpp class.">HierarchyMaintainer</a>; <a name="l00035"></a>00035 <a name="l00036"></a>00036 <span class="keyword">public</span>: <a name="l00048"></a>00048 <span class="keyword">static</span> <a class="code" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a>& getRoot(); <a name="l00049"></a>00049 <a name="l00054"></a>00054 <span class="keyword">static</span> <span class="keywordtype">void</span> setRootPriority(<a class="code" href="classlog4cpp_1_1Priority.html#19c2e47a94a531d3028f7c545671ff72" title="The type of Priority Values.">Priority::Value</a> priority); <a name="l00055"></a>00055 <a name="l00060"></a>00060 <span class="keyword">static</span> <a class="code" href="classlog4cpp_1_1Priority.html#19c2e47a94a531d3028f7c545671ff72" title="The type of Priority Values.">Priority::Value</a> getRootPriority() throw(); <a name="l00061"></a>00061 <a name="l00069"></a>00069 static <a class="code" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a>& getInstance(const std::<span class="keywordtype">string</span>& name); <a name="l00070"></a>00070 <a name="l00076"></a>00076 static <a class="code" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a>* exists(const std::<span class="keywordtype">string</span>& name); <a name="l00077"></a>00077 <a name="l00090"></a>00090 static std::vector<<a class="code" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a>*>* getCurrentCategories(); <a name="l00091"></a>00091 <a name="l00095"></a>00095 static <span class="keywordtype">void</span> shutdown(); <a name="l00096"></a>00096 <a name="l00100"></a>00100 virtual ~<a class="code" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a>(); <a name="l00101"></a>00101 <a name="l00106"></a>00106 virtual const std::<span class="keywordtype">string</span>& getName() const throw(); <a name="l00107"></a>00107 <a name="l00115"></a>00115 virtual <span class="keywordtype">void</span> setPriority(<a class="code" href="classlog4cpp_1_1Priority.html" title="The Priority class provides importance levels with which one can categorize log messages...">Priority</a>::Value priority) <a name="l00116"></a>00116 throw(std::invalid_argument); <a name="l00117"></a>00117 <a name="l00122"></a>00122 virtual <a class="code" href="classlog4cpp_1_1Priority.html" title="The Priority class provides importance levels with which one can categorize log messages...">Priority</a>::Value getPriority() const throw(); <a name="l00123"></a>00123 <a name="l00132"></a>00132 virtual <a class="code" href="classlog4cpp_1_1Priority.html" title="The Priority class provides importance levels with which one can categorize log messages...">Priority</a>::Value getChainedPriority() const throw(); <a name="l00133"></a>00133 <a name="l00140"></a>00140 virtual <span class="keywordtype">bool</span> isPriorityEnabled(<a class="code" href="classlog4cpp_1_1Priority.html" title="The Priority class provides importance levels with which one can categorize log messages...">Priority</a>::Value priority) const throw(); <a name="l00141"></a>00141 <a name="l00149"></a>00149 virtual <span class="keywordtype">void</span> addAppender(<a class="code" href="classlog4cpp_1_1Appender.html" title="Implement this interface for your own strategies for printing log statements.">Appender</a>* appender) <a name="l00150"></a>00150 throw(std::invalid_argument); <a name="l00151"></a>00151 <a name="l00158"></a>00158 virtual <span class="keywordtype">void</span> addAppender(<a class="code" href="classlog4cpp_1_1Appender.html" title="Implement this interface for your own strategies for printing log statements.">Appender</a>& appender); <a name="l00159"></a>00159 <a name="l00168"></a><a class="code" href="classlog4cpp_1_1Category.html#fc5a373da3c106e4da78822f99560075">00168</a> inline <span class="keywordtype">void</span> setAppender(<a class="code" href="classlog4cpp_1_1Appender.html" title="Implement this interface for your own strategies for printing log statements.">Appender</a>* appender) { <a name="l00169"></a>00169 <span class="keywordflow">if</span> (appender) { <a name="l00170"></a>00170 addAppender(appender); <a name="l00171"></a>00171 } <span class="keywordflow">else</span> { <a name="l00172"></a>00172 removeAllAppenders(); <a name="l00173"></a>00173 } <a name="l00174"></a>00174 }; <a name="l00175"></a>00175 <a name="l00182"></a><a class="code" href="classlog4cpp_1_1Category.html#d9820b0eb831c37832c850ed6110f124">00182</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classlog4cpp_1_1Category.html#d9820b0eb831c37832c850ed6110f124" title="Adds an Appender for this Category.">setAppender</a>(<a class="code" href="classlog4cpp_1_1Appender.html" title="Implement this interface for your own strategies for printing log statements.">Appender</a>& appender) { <a name="l00183"></a>00183 addAppender(appender); <a name="l00184"></a>00184 }; <a name="l00185"></a>00185 <a name="l00192"></a>00192 <span class="keyword">virtual</span> <a class="code" href="classlog4cpp_1_1Appender.html" title="Implement this interface for your own strategies for printing log statements.">Appender</a>* getAppender() <span class="keyword">const</span>; <a name="l00193"></a>00193 <a name="l00200"></a>00200 <span class="keyword">virtual</span> <a class="code" href="classlog4cpp_1_1Appender.html" title="Implement this interface for your own strategies for printing log statements.">Appender</a>* getAppender(<span class="keyword">const</span> std::string& name) <span class="keyword">const</span>; <a name="l00201"></a>00201 <a name="l00207"></a>00207 <span class="keyword">virtual</span> <a class="code" href="namespacelog4cpp.html#33a2e97cb897835dadbe401c6f9d658d">AppenderSet</a> getAllAppenders() <span class="keyword">const</span>; <a name="l00208"></a>00208 <a name="l00212"></a>00212 <span class="keyword">virtual</span> <span class="keywordtype">void</span> removeAllAppenders(); <a name="l00213"></a>00213 <a name="l00218"></a>00218 <span class="keyword">virtual</span> <span class="keywordtype">void</span> removeAppender(<a class="code" href="classlog4cpp_1_1Appender.html" title="Implement this interface for your own strategies for printing log statements.">Appender</a>* appender); <a name="l00219"></a>00219 <a name="l00226"></a><a class="code" href="classlog4cpp_1_1Category.html#322ca57d9dfd5291f7be3fb9f1d9076a">00226</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classlog4cpp_1_1Category.html#322ca57d9dfd5291f7be3fb9f1d9076a" title="Returns true if the Category owns the first Appender in its Appender set.">ownsAppender</a>() <span class="keyword">const</span> throw() { <a name="l00227"></a>00227 <span class="keywordflow">return</span> ownsAppender(getAppender()); <a name="l00228"></a>00228 }; <a name="l00229"></a>00229 <a name="l00235"></a>00235 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> ownsAppender(<a class="code" href="classlog4cpp_1_1Appender.html" title="Implement this interface for your own strategies for printing log statements.">Appender</a>* appender) <span class="keyword">const</span> <span class="keywordflow">throw</span>(); <a name="l00236"></a>00236 <a name="l00248"></a>00248 <span class="keyword">virtual</span> <span class="keywordtype">void</span> callAppenders(<span class="keyword">const</span> <a class="code" href="structlog4cpp_1_1LoggingEvent.html" title="The internal representation of logging events.">LoggingEvent</a>& event) <span class="keywordflow">throw</span>(); <a name="l00249"></a>00249 <a name="l00253"></a>00253 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setAdditivity(<span class="keywordtype">bool</span> additivity); <a name="l00254"></a>00254 <a name="l00258"></a>00258 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> getAdditivity() <span class="keyword">const</span> throw(); <a name="l00259"></a>00259 <a name="l00265"></a>00265 virtual <a class="code" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a>* getParent() throw(); <a name="l00266"></a>00266 <a name="l00272"></a>00272 virtual const <a class="code" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a>* getParent() const throw(); <a name="l00273"></a>00273 <a name="l00281"></a>00281 virtual <span class="keywordtype">void</span> log(<a class="code" href="classlog4cpp_1_1Priority.html" title="The Priority class provides importance levels with which one can categorize log messages...">Priority</a>::Value priority, const <span class="keywordtype">char</span>* stringFormat, <a name="l00282"></a>00282 ...) throw(); <a name="l00283"></a>00283 <a name="l00289"></a>00289 virtual <span class="keywordtype">void</span> log(<a class="code" href="classlog4cpp_1_1Priority.html" title="The Priority class provides importance levels with which one can categorize log messages...">Priority</a>::Value priority, <a name="l00290"></a>00290 const std::<span class="keywordtype">string</span>& message) throw(); <a name="l00291"></a>00291 <a name="l00300"></a>00300 virtual <span class="keywordtype">void</span> logva(<a class="code" href="classlog4cpp_1_1Priority.html" title="The Priority class provides importance levels with which one can categorize log messages...">Priority</a>::Value priority, <a name="l00301"></a>00301 const <span class="keywordtype">char</span>* stringFormat, <a name="l00302"></a>00302 va_list va) throw(); <a name="l00303"></a>00303 <a name="l00310"></a>00310 <span class="keywordtype">void</span> debug(const <span class="keywordtype">char</span>* stringFormat, ...) throw(); <a name="l00311"></a>00311 <a name="l00316"></a>00316 <span class="keywordtype">void</span> debug(const std::<span class="keywordtype">string</span>& message) throw(); <a name="l00317"></a>00317 <a name="l00322"></a><a class="code" href="classlog4cpp_1_1Category.html#b5da3d7f8c2fb714b5548fa65f07a661">00322</a> inline <span class="keywordtype">bool</span> isDebugEnabled() const throw() { <a name="l00323"></a>00323 <span class="keywordflow">return</span> isPriorityEnabled(<a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1af5ea0b81069b260ca2c6134a843887974">Priority::DEBUG</a>); <a name="l00324"></a>00324 }; <a name="l00325"></a>00325 <a name="l00330"></a><a class="code" href="classlog4cpp_1_1Category.html#fac27826bcfb981b5ddd9395abfe7248">00330</a> <span class="keyword">inline</span> <a class="code" href="classlog4cpp_1_1CategoryStream.html" title="This class enables streaming simple types and objects to a category.">CategoryStream</a> <a class="code" href="classlog4cpp_1_1Category.html#fac27826bcfb981b5ddd9395abfe7248" title="Return a CategoryStream with priority DEBUG.">debugStream</a>() { <a name="l00331"></a>00331 <span class="keywordflow">return</span> getStream(<a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1af5ea0b81069b260ca2c6134a843887974">Priority::DEBUG</a>); <a name="l00332"></a>00332 } <a name="l00333"></a>00333 <a name="l00340"></a>00340 <span class="keywordtype">void</span> info(<span class="keyword">const</span> <span class="keywordtype">char</span>* stringFormat, ...) throw(); <a name="l00341"></a>00341 <a name="l00346"></a>00346 <span class="keywordtype">void</span> info(const std::<span class="keywordtype">string</span>& message) throw(); <a name="l00347"></a>00347 <a name="l00352"></a><a class="code" href="classlog4cpp_1_1Category.html#9c07515c4056a3bac19754c263f67d41">00352</a> inline <span class="keywordtype">bool</span> isInfoEnabled() const throw() { <a name="l00353"></a>00353 <span class="keywordflow">return</span> isPriorityEnabled(<a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1af72bbbc5d56f3e830c086fe0d955b97e3">Priority::INFO</a>); <a name="l00354"></a>00354 }; <a name="l00355"></a>00355 <a name="l00360"></a><a class="code" href="classlog4cpp_1_1Category.html#752186a865f70d3e2d9683be95875029">00360</a> <span class="keyword">inline</span> <a class="code" href="classlog4cpp_1_1CategoryStream.html" title="This class enables streaming simple types and objects to a category.">CategoryStream</a> <a class="code" href="classlog4cpp_1_1Category.html#752186a865f70d3e2d9683be95875029" title="Return a CategoryStream with priority INFO.">infoStream</a>() { <a name="l00361"></a>00361 <span class="keywordflow">return</span> getStream(<a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1af72bbbc5d56f3e830c086fe0d955b97e3">Priority::INFO</a>); <a name="l00362"></a>00362 } <a name="l00363"></a>00363 <a name="l00370"></a>00370 <span class="keywordtype">void</span> notice(<span class="keyword">const</span> <span class="keywordtype">char</span>* stringFormat, ...) throw(); <a name="l00371"></a>00371 <a name="l00376"></a>00376 <span class="keywordtype">void</span> notice(const std::<span class="keywordtype">string</span>& message) throw(); <a name="l00377"></a>00377 <a name="l00382"></a><a class="code" href="classlog4cpp_1_1Category.html#27e291604a46fb814ffc9145d0549806">00382</a> inline <span class="keywordtype">bool</span> isNoticeEnabled() const throw() { <a name="l00383"></a>00383 <span class="keywordflow">return</span> isPriorityEnabled(<a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1afdfb1498a2aaab7c1dd312ed3a4e65efd">Priority::NOTICE</a>); <a name="l00384"></a>00384 }; <a name="l00385"></a>00385 <a name="l00390"></a><a class="code" href="classlog4cpp_1_1Category.html#6f0ece985281625a21d7d941b3683274">00390</a> <span class="keyword">inline</span> <a class="code" href="classlog4cpp_1_1CategoryStream.html" title="This class enables streaming simple types and objects to a category.">CategoryStream</a> <a class="code" href="classlog4cpp_1_1Category.html#6f0ece985281625a21d7d941b3683274" title="Return a CategoryStream with priority NOTICE.">noticeStream</a>() { <a name="l00391"></a>00391 <span class="keywordflow">return</span> getStream(<a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1afdfb1498a2aaab7c1dd312ed3a4e65efd">Priority::NOTICE</a>); <a name="l00392"></a>00392 } <a name="l00393"></a>00393 <a name="l00400"></a>00400 <span class="keywordtype">void</span> warn(<span class="keyword">const</span> <span class="keywordtype">char</span>* stringFormat, ...) throw(); <a name="l00401"></a>00401 <a name="l00406"></a>00406 <span class="keywordtype">void</span> warn(const std::<span class="keywordtype">string</span>& message) throw(); <a name="l00407"></a>00407 <a name="l00412"></a><a class="code" href="classlog4cpp_1_1Category.html#c6d8d0e26d6b2a0b06397ae282e9479c">00412</a> inline <span class="keywordtype">bool</span> isWarnEnabled() const throw() { <a name="l00413"></a>00413 <span class="keywordflow">return</span> isPriorityEnabled(<a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1afa5f201ad98003369dfbcf6a7dcc9b166">Priority::WARN</a>); <a name="l00414"></a>00414 }; <a name="l00415"></a>00415 <a name="l00420"></a><a class="code" href="classlog4cpp_1_1Category.html#c283548b14f3897e20f85b83f6ce9e35">00420</a> <span class="keyword">inline</span> <a class="code" href="classlog4cpp_1_1CategoryStream.html" title="This class enables streaming simple types and objects to a category.">CategoryStream</a> <a class="code" href="classlog4cpp_1_1Category.html#c283548b14f3897e20f85b83f6ce9e35" title="Return a CategoryStream with priority WARN.">warnStream</a>() { <a name="l00421"></a>00421 <span class="keywordflow">return</span> getStream(<a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1afa5f201ad98003369dfbcf6a7dcc9b166">Priority::WARN</a>); <a name="l00422"></a>00422 }; <a name="l00423"></a>00423 <a name="l00430"></a>00430 <span class="keywordtype">void</span> error(<span class="keyword">const</span> <span class="keywordtype">char</span>* stringFormat, ...) throw(); <a name="l00431"></a>00431 <a name="l00436"></a>00436 <span class="keywordtype">void</span> error(const std::<span class="keywordtype">string</span>& message) throw(); <a name="l00437"></a>00437 <a name="l00442"></a><a class="code" href="classlog4cpp_1_1Category.html#36e49c5fd3232cc38589262b0552a9d9">00442</a> inline <span class="keywordtype">bool</span> isErrorEnabled() const throw() { <a name="l00443"></a>00443 <span class="keywordflow">return</span> isPriorityEnabled(<a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1afc18e3d423b0d2eaaa790344b672acc60">Priority::ERROR</a>); <a name="l00444"></a>00444 }; <a name="l00445"></a>00445 <a name="l00450"></a><a class="code" href="classlog4cpp_1_1Category.html#f65fd83dd2808f86950d66cf66176520">00450</a> <span class="keyword">inline</span> <a class="code" href="classlog4cpp_1_1CategoryStream.html" title="This class enables streaming simple types and objects to a category.">CategoryStream</a> <a class="code" href="classlog4cpp_1_1Category.html#f65fd83dd2808f86950d66cf66176520" title="Return a CategoryStream with priority ERROR.">errorStream</a>() { <a name="l00451"></a>00451 <span class="keywordflow">return</span> getStream(<a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1afc18e3d423b0d2eaaa790344b672acc60">Priority::ERROR</a>); <a name="l00452"></a>00452 }; <a name="l00453"></a>00453 <a name="l00460"></a>00460 <span class="keywordtype">void</span> crit(<span class="keyword">const</span> <span class="keywordtype">char</span>* stringFormat, ...) throw(); <a name="l00461"></a>00461 <a name="l00466"></a>00466 <span class="keywordtype">void</span> crit(const std::<span class="keywordtype">string</span>& message) throw(); <a name="l00467"></a>00467 <a name="l00472"></a><a class="code" href="classlog4cpp_1_1Category.html#7e7521c434a9ce68d2b995e3b405b01d">00472</a> inline <span class="keywordtype">bool</span> isCritEnabled() const throw() { <a name="l00473"></a>00473 <span class="keywordflow">return</span> isPriorityEnabled(<a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1af2a17831f5d9979da0dc44cd778b4eeff">Priority::CRIT</a>); <a name="l00474"></a>00474 }; <a name="l00475"></a>00475 <a name="l00480"></a><a class="code" href="classlog4cpp_1_1Category.html#31d8ba46b15a2ca6ac7281ac44302e8e">00480</a> <span class="keyword">inline</span> <a class="code" href="classlog4cpp_1_1CategoryStream.html" title="This class enables streaming simple types and objects to a category.">CategoryStream</a> <a class="code" href="classlog4cpp_1_1Category.html#31d8ba46b15a2ca6ac7281ac44302e8e" title="Return a CategoryStream with priority CRIT.">critStream</a>() { <a name="l00481"></a>00481 <span class="keywordflow">return</span> getStream(<a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1af2a17831f5d9979da0dc44cd778b4eeff">Priority::CRIT</a>); <a name="l00482"></a>00482 }; <a name="l00483"></a>00483 <a name="l00490"></a>00490 <span class="keywordtype">void</span> alert(<span class="keyword">const</span> <span class="keywordtype">char</span>* stringFormat, ...) throw(); <a name="l00491"></a>00491 <a name="l00496"></a>00496 <span class="keywordtype">void</span> alert(const std::<span class="keywordtype">string</span>& message) throw(); <a name="l00497"></a>00497 <a name="l00502"></a><a class="code" href="classlog4cpp_1_1Category.html#85946adfd9cda015cea491e1caf05718">00502</a> inline <span class="keywordtype">bool</span> isAlertEnabled() const throw() { <a name="l00503"></a>00503 <span class="keywordflow">return</span> isPriorityEnabled(<a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1af972739ec54e849f882cf52c134d82eb7">Priority::ALERT</a>); <a name="l00504"></a>00504 }; <a name="l00505"></a>00505 <a name="l00510"></a><a class="code" href="classlog4cpp_1_1Category.html#50ebe1facaa40c12cc95dd6b10f6557e">00510</a> <span class="keyword">inline</span> <a class="code" href="classlog4cpp_1_1CategoryStream.html" title="This class enables streaming simple types and objects to a category.">CategoryStream</a> <a class="code" href="classlog4cpp_1_1Category.html#50ebe1facaa40c12cc95dd6b10f6557e" title="Return a CategoryStream with priority ALERT.">alertStream</a>() throw() { <a name="l00511"></a>00511 <span class="keywordflow">return</span> getStream(<a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1af972739ec54e849f882cf52c134d82eb7">Priority::ALERT</a>); <a name="l00512"></a>00512 }; <a name="l00513"></a>00513 <a name="l00520"></a>00520 <span class="keywordtype">void</span> emerg(<span class="keyword">const</span> <span class="keywordtype">char</span>* stringFormat, ...) throw(); <a name="l00521"></a>00521 <a name="l00526"></a>00526 <span class="keywordtype">void</span> emerg(const std::<span class="keywordtype">string</span>& message) throw(); <a name="l00527"></a>00527 <a name="l00532"></a><a class="code" href="classlog4cpp_1_1Category.html#148f14c76ab768f54d2137862768ee29">00532</a> inline <span class="keywordtype">bool</span> isEmergEnabled() const throw() { <a name="l00533"></a>00533 <span class="keywordflow">return</span> isPriorityEnabled(<a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1af6a3724073818ca3ba3fba1392a7bd0fe">Priority::EMERG</a>); <a name="l00534"></a>00534 }; <a name="l00535"></a>00535 <a name="l00540"></a><a class="code" href="classlog4cpp_1_1Category.html#73790279fa893f1000b01b2c98894c89">00540</a> <span class="keyword">inline</span> <a class="code" href="classlog4cpp_1_1CategoryStream.html" title="This class enables streaming simple types and objects to a category.">CategoryStream</a> <a class="code" href="classlog4cpp_1_1Category.html#73790279fa893f1000b01b2c98894c89" title="Return a CategoryStream with priority EMERG.">emergStream</a>() { <a name="l00541"></a>00541 <span class="keywordflow">return</span> getStream(<a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1af6a3724073818ca3ba3fba1392a7bd0fe">Priority::EMERG</a>); <a name="l00542"></a>00542 }; <a name="l00543"></a>00543 <a name="l00552"></a>00552 <span class="keywordtype">void</span> fatal(<span class="keyword">const</span> <span class="keywordtype">char</span>* stringFormat, ...) throw(); <a name="l00553"></a>00553 <a name="l00560"></a>00560 <span class="keywordtype">void</span> fatal(const std::<span class="keywordtype">string</span>& message) throw(); <a name="l00561"></a>00561 <a name="l00568"></a><a class="code" href="classlog4cpp_1_1Category.html#4c4ee870570803e12d5aafec40f6b8e8">00568</a> inline <span class="keywordtype">bool</span> isFatalEnabled() const throw() { <a name="l00569"></a>00569 <span class="keywordflow">return</span> isPriorityEnabled(<a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1af1dae0224ebde51778073e7ba502a7510">Priority::FATAL</a>); <a name="l00570"></a>00570 }; <a name="l00571"></a>00571 <a name="l00578"></a><a class="code" href="classlog4cpp_1_1Category.html#9ddbaf1debae0bda23827b8b14867943">00578</a> <span class="keyword">inline</span> <a class="code" href="classlog4cpp_1_1CategoryStream.html" title="This class enables streaming simple types and objects to a category.">CategoryStream</a> <a class="code" href="classlog4cpp_1_1Category.html#9ddbaf1debae0bda23827b8b14867943" title="Return a CategoryStream with priority FATAL.">fatalStream</a>() { <a name="l00579"></a>00579 <span class="keywordflow">return</span> getStream(<a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1af1dae0224ebde51778073e7ba502a7510">Priority::FATAL</a>); <a name="l00580"></a>00580 }; <a name="l00581"></a>00581 <a name="l00587"></a>00587 <span class="keyword">virtual</span> <a class="code" href="classlog4cpp_1_1CategoryStream.html" title="This class enables streaming simple types and objects to a category.">CategoryStream</a> getStream(<a class="code" href="classlog4cpp_1_1Priority.html#19c2e47a94a531d3028f7c545671ff72" title="The type of Priority Values.">Priority::Value</a> priority); <a name="l00588"></a>00588 <a name="l00594"></a>00594 <span class="keyword">virtual</span> <a class="code" href="classlog4cpp_1_1CategoryStream.html" title="This class enables streaming simple types and objects to a category.">CategoryStream</a> operator<<(<a class="code" href="classlog4cpp_1_1Priority.html#19c2e47a94a531d3028f7c545671ff72" title="The type of Priority Values.">Priority::Value</a> priority); <a name="l00595"></a>00595 <a name="l00596"></a>00596 <span class="keyword">protected</span>: <a name="l00597"></a>00597 <a name="l00606"></a>00606 <a class="code" href="namespacelog4cpp.html#c1bf97ac55304dbd4f0dd90a689ccae7">Category</a>(<span class="keyword">const</span> std::string& name, <a class="code" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a>* parent, <a name="l00607"></a>00607 <a class="code" href="classlog4cpp_1_1Priority.html#19c2e47a94a531d3028f7c545671ff72" title="The type of Priority Values.">Priority::Value</a> priority = <a class="code" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1afebdf006bbefb65f1d654594992ac4e4f">Priority::NOTSET</a>); <a name="l00608"></a>00608 <a name="l00609"></a>00609 <span class="keyword">virtual</span> <span class="keywordtype">void</span> _logUnconditionally(<a class="code" href="classlog4cpp_1_1Priority.html#19c2e47a94a531d3028f7c545671ff72" title="The type of Priority Values.">Priority::Value</a> priority, <a name="l00610"></a>00610 <span class="keyword">const</span> <span class="keywordtype">char</span>* format, <a name="l00611"></a>00611 va_list arguments) <span class="keywordflow">throw</span>(); <a name="l00612"></a>00612 <a name="l00618"></a>00618 <span class="keyword">virtual</span> <span class="keywordtype">void</span> _logUnconditionally2(<a class="code" href="classlog4cpp_1_1Priority.html#19c2e47a94a531d3028f7c545671ff72" title="The type of Priority Values.">Priority::Value</a> priority, <a name="l00619"></a>00619 <span class="keyword">const</span> std::string& message) <span class="keywordflow">throw</span>(); <a name="l00620"></a>00620 <a name="l00621"></a>00621 <span class="keyword">private</span>: <a name="l00622"></a>00622 <a name="l00623"></a>00623 <span class="comment">/* prevent copying and assignment */</span> <a name="l00624"></a>00624 <a class="code" href="namespacelog4cpp.html#c1bf97ac55304dbd4f0dd90a689ccae7">Category</a>(<span class="keyword">const</span> <a class="code" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a>& other); <a name="l00625"></a>00625 <a class="code" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a>& operator=(<span class="keyword">const</span> <a class="code" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a>& other); <a name="l00626"></a>00626 <a name="l00628"></a>00628 <span class="keyword">const</span> std::string _name; <a name="l00629"></a>00629 <a name="l00634"></a>00634 <a class="code" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a>* _parent; <a name="l00635"></a>00635 <a name="l00639"></a>00639 <span class="keyword">volatile</span> <a class="code" href="classlog4cpp_1_1Priority.html#19c2e47a94a531d3028f7c545671ff72" title="The type of Priority Values.">Priority::Value</a> _priority; <a name="l00640"></a>00640 <a name="l00641"></a>00641 <span class="keyword">typedef</span> std::map<Appender *, bool> OwnsAppenderMap; <a name="l00642"></a>00642 <a name="l00649"></a>00649 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> ownsAppender(<a class="code" href="classlog4cpp_1_1Appender.html" title="Implement this interface for your own strategies for printing log statements.">Appender</a>* appender, <a name="l00650"></a>00650 OwnsAppenderMap::iterator& i2) <span class="keywordflow">throw</span>(); <a name="l00651"></a>00651 <a name="l00652"></a>00652 <a class="code" href="namespacelog4cpp.html#33a2e97cb897835dadbe401c6f9d658d">AppenderSet</a> _appender; <a name="l00653"></a>00653 <span class="keyword">mutable</span> <a class="code" href="classlog4cpp_1_1threading_1_1Mutex.html">threading::Mutex</a> _appenderSetMutex; <a name="l00654"></a>00654 <a name="l00660"></a>00660 OwnsAppenderMap _ownsAppender; <a name="l00661"></a>00661 <a name="l00666"></a>00666 <span class="keyword">volatile</span> <span class="keywordtype">bool</span> _isAdditive; <a name="l00667"></a>00667 <a name="l00668"></a>00668 }; <a name="l00669"></a>00669 <a name="l00670"></a>00670 } <a name="l00671"></a>00671 <span class="preprocessor">#endif // _LOG4CPP_CATEGORY_HH</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Sun Jul 26 19:34:33 2009 for log4cpp by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> </body> </html>