<!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: FixedContextCategory.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>FixedContextCategory.hh</h1><a href="FixedContextCategory_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"> * FixedContextCategory.hh</span> <a name="l00003"></a>00003 <span class="comment"> *</span> <a name="l00004"></a>00004 <span class="comment"> * Copyright 2001, LifeLine Networks BV (www.lifeline.nl). All rights reserved.</span> <a name="l00005"></a>00005 <span class="comment"> * Copyright 2001, 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_FIXEDCONTEXTCATEGORY_HH</span> <a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define _LOG4CPP_FIXEDCONTEXTCATEGORY_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="Category_8hh.html">log4cpp/Category.hh</a>></span> <a name="l00015"></a>00015 <a name="l00016"></a>00016 <span class="keyword">namespace </span>log4cpp { <a name="l00017"></a>00017 <a name="l00029"></a><a class="code" href="classlog4cpp_1_1FixedContextCategory.html">00029</a> <span class="keyword">class </span><a class="code" href="Export_8hh.html#30f9ff9641fa394781f52398a8312437">LOG4CPP_EXPORT</a> <a class="code" href="classlog4cpp_1_1FixedContextCategory.html" title="This Category subclass replaces the NDC field in LoggingEvents with a fixed context...">FixedContextCategory</a> : <span class="keyword">public</span> <a class="code" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a> { <a name="l00030"></a>00030 <a name="l00031"></a>00031 <span class="keyword">public</span>: <a name="l00032"></a>00032 <a name="l00040"></a>00040 <a class="code" href="classlog4cpp_1_1FixedContextCategory.html" title="This Category subclass replaces the NDC field in LoggingEvents with a fixed context...">FixedContextCategory</a>(<span class="keyword">const</span> std::string& name, <a name="l00041"></a>00041 <span class="keyword">const</span> std::string& context = <span class="stringliteral">""</span>); <a name="l00042"></a>00042 <a name="l00043"></a>00043 <a name="l00047"></a>00047 <span class="keyword">virtual</span> ~<a class="code" href="classlog4cpp_1_1FixedContextCategory.html" title="This Category subclass replaces the NDC field in LoggingEvents with a fixed context...">FixedContextCategory</a>(); <a name="l00048"></a>00048 <a name="l00053"></a>00053 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setContext(<span class="keyword">const</span> std::string& context); <a name="l00054"></a>00054 <a name="l00059"></a>00059 <span class="keyword">virtual</span> std::string getContext() <span class="keyword">const</span>; <a name="l00060"></a>00060 <a name="l00065"></a>00065 <span class="keyword">virtual</span> <a class="code" href="classlog4cpp_1_1Priority.html#19c2e47a94a531d3028f7c545671ff72" title="The type of Priority Values.">Priority::Value</a> getPriority() <span class="keyword">const</span> <span class="keywordflow">throw</span>(); <a name="l00066"></a>00066 <a name="l00075"></a>00075 <span class="keyword">virtual</span> <a class="code" href="classlog4cpp_1_1Priority.html#19c2e47a94a531d3028f7c545671ff72" title="The type of Priority Values.">Priority::Value</a> getChainedPriority() <span class="keyword">const</span> <span class="keywordflow">throw</span>(); <a name="l00076"></a>00076 <a name="l00080"></a>00080 <span class="keyword">virtual</span> <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) <span class="keywordflow">throw</span>(); <a name="l00081"></a>00081 <a name="l00085"></a>00085 <span class="keyword">virtual</span> <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="l00086"></a>00086 <a name="l00092"></a>00092 <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="l00093"></a>00093 <a name="l00100"></a>00100 <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="l00101"></a>00101 <a name="l00107"></a>00107 <span class="keyword">virtual</span> <a class="code" href="namespacelog4cpp.html#33a2e97cb897835dadbe401c6f9d658d">AppenderSet</a> getAllAppenders() <span class="keyword">const</span>; <a name="l00108"></a>00108 <a name="l00113"></a>00113 <span class="keyword">virtual</span> <span class="keywordtype">void</span> removeAllAppenders(); <a name="l00114"></a>00114 <a name="l00119"></a>00119 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> ownsAppender() <span class="keyword">const</span> <span class="keywordflow">throw</span>(); <a name="l00120"></a>00120 <a name="l00125"></a>00125 <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="l00126"></a>00126 <span class="keyword">const</span> <span class="keywordflow">throw</span>(); <a name="l00127"></a>00127 <a name="l00139"></a>00139 <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="l00140"></a>00140 <a name="l00144"></a>00144 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setAdditivity(<span class="keywordtype">bool</span> additivity); <a name="l00145"></a>00145 <a name="l00149"></a>00149 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> getAdditivity() <span class="keyword">const</span> <span class="keywordflow">throw</span>(); <a name="l00150"></a>00150 <a name="l00151"></a>00151 <span class="keyword">protected</span>: <a name="l00152"></a>00152 <a name="l00158"></a>00158 <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="l00159"></a>00159 <span class="keyword">const</span> std::string& message) <span class="keywordflow">throw</span>(); <a name="l00160"></a>00160 <a name="l00161"></a>00161 <span class="keyword">private</span>: <a name="l00162"></a>00162 <a name="l00166"></a>00166 <a class="code" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a>& _delegate; <a name="l00167"></a>00167 <a name="l00169"></a>00169 std::string _context; <a name="l00170"></a>00170 <a name="l00171"></a>00171 }; <a name="l00172"></a>00172 <a name="l00173"></a>00173 } <a name="l00174"></a>00174 <span class="preprocessor">#endif // _LOG4CPP_FIXEDCONTEXTCATEGORY_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>