This file is indexed.

/usr/share/doc/liblog4tango4-doc/html/api/Logger_8hh_source.html is in liblog4tango4-doc 7.2.6+dfsg-4build2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>log4tango: Logger.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.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">log4tango&#160;<span id="projectnumber">4.0.3</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</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 id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">Logger.hh</div>  </div>
</div>
<div class="contents">
<a href="Logger_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">// Logger.hh</span>
<a name="l00003"></a>00003 <span class="comment">//</span>
<a name="l00004"></a>00004 <span class="comment">// Copyright (C) :  2000 - 2002</span>
<a name="l00005"></a>00005 <span class="comment">//                                      LifeLine Networks BV (www.lifeline.nl). All rights reserved.</span>
<a name="l00006"></a>00006 <span class="comment">//                                      Bastiaan Bakker. All rights reserved.   </span>
<a name="l00007"></a>00007 <span class="comment">//                                      </span>
<a name="l00008"></a>00008 <span class="comment">//                                      2004,2005,2006,2007,2008,2009,2010</span>
<a name="l00009"></a>00009 <span class="comment">//                                      Synchrotron SOLEIL</span>
<a name="l00010"></a>00010 <span class="comment">//                      L&#39;Orme des Merisiers</span>
<a name="l00011"></a>00011 <span class="comment">//                      Saint-Aubin - BP 48 - France</span>
<a name="l00012"></a>00012 <span class="comment">//</span>
<a name="l00013"></a>00013 <span class="comment">// This file is part of log4tango.</span>
<a name="l00014"></a>00014 <span class="comment">//</span>
<a name="l00015"></a>00015 <span class="comment">// Log4ango is free software: you can redistribute it and/or modify</span>
<a name="l00016"></a>00016 <span class="comment">// it under the terms of the GNU Lesser General Public License as published by</span>
<a name="l00017"></a>00017 <span class="comment">// the Free Software Foundation, either version 3 of the License, or</span>
<a name="l00018"></a>00018 <span class="comment">// (at your option) any later version.</span>
<a name="l00019"></a>00019 <span class="comment">// </span>
<a name="l00020"></a>00020 <span class="comment">// Log4tango is distributed in the hope that it will be useful,</span>
<a name="l00021"></a>00021 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00022"></a>00022 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00023"></a>00023 <span class="comment">// GNU Lesser General Public License for more details.</span>
<a name="l00024"></a>00024 <span class="comment">// </span>
<a name="l00025"></a>00025 <span class="comment">// You should have received a copy of the GNU Lesser General Public License</span>
<a name="l00026"></a>00026 <span class="comment">// along with Log4Tango.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef _LOG4TANGO_LOGGER_H</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define _LOG4TANGO_LOGGER_H</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="comment">//-----------------------------------------------------------------------------</span>
<a name="l00032"></a>00032 <span class="comment">// IMPL. OPTION</span>
<a name="l00033"></a>00033 <span class="comment">//----------------------------------------------------------------------------- </span>
<a name="l00034"></a>00034 <span class="comment">//#define LOG4TANGO_LOGGERS_USE_LOGSTREAM</span>
<a name="l00035"></a>00035  
<a name="l00036"></a>00036 <span class="preprocessor">#include &lt;<a class="code" href="Portability_8hh.html">log4tango/Portability.hh</a>&gt;</span>
<a name="l00037"></a>00037 <span class="preprocessor">#include &lt;<a class="code" href="AppenderAttachable_8hh.html">log4tango/AppenderAttachable.hh</a>&gt;</span>
<a name="l00038"></a>00038 <span class="preprocessor">#include &lt;<a class="code" href="LoggingEvent_8hh.html">log4tango/LoggingEvent.hh</a>&gt;</span>
<a name="l00039"></a>00039 <span class="preprocessor">#include &lt;<a class="code" href="Level_8hh.html">log4tango/Level.hh</a>&gt;</span>
<a name="l00040"></a>00040 <span class="preprocessor">#ifndef LOG4TANGO_LOGGERS_USE_LOGSTREAM</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor"># include &lt;<a class="code" href="LoggerStream_8hh.html">log4tango/LoggerStream.hh</a>&gt;</span>
<a name="l00042"></a>00042 <span class="preprocessor">#endif</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span>
<a name="l00044"></a>00044 <span class="keyword">namespace </span>log4tango {
<a name="l00045"></a>00045 
<a name="l00046"></a>00046 <span class="preprocessor">#ifdef LOG4TANGO_LOGGERS_USE_LOGSTREAM</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="comment">//-----------------------------------------------------------------------------</span>
<a name="l00048"></a>00048 <span class="comment">// FORWARD DECL.</span>
<a name="l00049"></a>00049 <span class="comment">//-----------------------------------------------------------------------------  </span>
<a name="l00050"></a>00050 <span class="keyword">class </span>LogStream;
<a name="l00051"></a>00051 <span class="preprocessor">#endif</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span>
<a name="l00053"></a>00053 <span class="comment">//-----------------------------------------------------------------------------</span>
<a name="l00054"></a>00054 <span class="comment">// class : Logger</span>
<a name="l00055"></a>00055 <span class="comment">//-----------------------------------------------------------------------------   </span>
<a name="l00056"></a><a class="code" href="classlog4tango_1_1Logger.html">00056</a> <span class="keyword">class </span><a class="code" href="Export_8hh.html#abb9e874b4244b6247ac9dbb62a2c7b8f">LOG4TANGO_EXPORT</a> <a class="code" href="classlog4tango_1_1Logger.html">Logger</a> : <span class="keyword">public</span> <a class="code" href="classlog4tango_1_1AppenderAttachable.html">AppenderAttachable</a>
<a name="l00057"></a>00057 {
<a name="l00058"></a>00058 <span class="keyword">public</span>:   
<a name="l00059"></a>00059 
<a name="l00065"></a>00065   <a class="code" href="namespacelog4tango.html#a32cdd650c4bcacf2d8fbd74caae3205d">Logger</a>(<span class="keyword">const</span> std::string&amp; name, 
<a name="l00066"></a>00066          <a class="code" href="classlog4tango_1_1Level.html#aa708c09b6a19a8cc8a3b19631561ca99" title="The type of Level Values.">Level::Value</a> level = <a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461a955ee789684a2e9952b7e4f56b6bb74f">Level::OFF</a>);
<a name="l00067"></a>00067 
<a name="l00071"></a>00071   <span class="keyword">virtual</span> ~<a class="code" href="classlog4tango_1_1Logger.html">Logger</a>();
<a name="l00072"></a>00072 
<a name="l00077"></a><a class="code" href="classlog4tango_1_1Logger.html#abfe1c32b01e64c5f58f52812f898f170">00077</a>   <span class="keyword">inline</span> <span class="keyword">const</span> std::string&amp; <a class="code" href="classlog4tango_1_1Logger.html#abfe1c32b01e64c5f58f52812f898f170" title="Return the logger name.">get_name</a>()<span class="keyword"> const </span>{
<a name="l00078"></a>00078     <span class="keywordflow">return</span> _name; 
<a name="l00079"></a>00079   }
<a name="l00080"></a>00080       
<a name="l00085"></a>00085   <span class="keywordtype">void</span> set_level (<a class="code" href="classlog4tango_1_1Level.html#aa708c09b6a19a8cc8a3b19631561ca99" title="The type of Level Values.">Level::Value</a> level);
<a name="l00086"></a>00086 
<a name="l00091"></a><a class="code" href="classlog4tango_1_1Logger.html#a0bfd7a54498aba29263cfb0dae55faff">00091</a>   <span class="keyword">inline</span> <a class="code" href="classlog4tango_1_1Level.html#aa708c09b6a19a8cc8a3b19631561ca99" title="The type of Level Values.">Level::Value</a> <a class="code" href="classlog4tango_1_1Logger.html#a0bfd7a54498aba29263cfb0dae55faff" title="Returns the assigned Level, if any, for this Logger.">get_level</a>()<span class="keyword"> const </span>{
<a name="l00092"></a>00092     <span class="keywordflow">return</span> _level;
<a name="l00093"></a>00093   }
<a name="l00094"></a>00094 
<a name="l00101"></a><a class="code" href="classlog4tango_1_1Logger.html#a393cade41cee1267e49018f5b4f8fa67">00101</a>   <span class="keywordtype">bool</span> <a class="code" href="classlog4tango_1_1Logger.html#a393cade41cee1267e49018f5b4f8fa67" title="Returns true if the level of the Logger is equal to or higher than given level.">is_level_enabled</a> (<a class="code" href="classlog4tango_1_1Level.html#aa708c09b6a19a8cc8a3b19631561ca99" title="The type of Level Values.">Level::Value</a> level)<span class="keyword"> const </span>{
<a name="l00102"></a>00102     <span class="keywordflow">return</span> _level &gt;= level;
<a name="l00103"></a>00103   }
<a name="l00104"></a>00104 
<a name="l00111"></a>00111   <span class="keywordtype">void</span> log (<a class="code" href="classlog4tango_1_1Level.html#aa708c09b6a19a8cc8a3b19631561ca99" title="The type of Level Values.">Level::Value</a> level, 
<a name="l00112"></a>00112             <span class="keyword">const</span> <span class="keywordtype">char</span>* string_format, ...);
<a name="l00113"></a>00113 
<a name="l00119"></a><a class="code" href="classlog4tango_1_1Logger.html#afab624480348ae2bae502c72efeaf38e">00119</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> log (<a class="code" href="classlog4tango_1_1Level.html#aa708c09b6a19a8cc8a3b19631561ca99" title="The type of Level Values.">Level::Value</a> level, <span class="keyword">const</span> std::string&amp; message) 
<a name="l00120"></a>00120   { 
<a name="l00121"></a>00121     <span class="keywordflow">if</span> (is_level_enabled(level)) {
<a name="l00122"></a>00122       log_unconditionally(level, message);
<a name="l00123"></a>00123     }
<a name="l00124"></a>00124   }
<a name="l00125"></a>00125  
<a name="l00132"></a>00132   <span class="keywordtype">void</span> log_unconditionally (<a class="code" href="classlog4tango_1_1Level.html#aa708c09b6a19a8cc8a3b19631561ca99" title="The type of Level Values.">Level::Value</a> level, 
<a name="l00133"></a>00133                             <span class="keyword">const</span> <span class="keywordtype">char</span>* string_format, ...);
<a name="l00134"></a>00134 
<a name="l00140"></a>00140   <span class="keywordtype">void</span> log_unconditionally (<a class="code" href="classlog4tango_1_1Level.html#aa708c09b6a19a8cc8a3b19631561ca99" title="The type of Level Values.">Level::Value</a> level, 
<a name="l00141"></a>00141                             <span class="keyword">const</span> std::string&amp; message);
<a name="l00142"></a>00142                 
<a name="l00148"></a>00148   <span class="keywordtype">void</span> debug (<span class="keyword">const</span> <span class="keywordtype">char</span>* string_format, ...);
<a name="l00149"></a>00149 
<a name="l00154"></a><a class="code" href="classlog4tango_1_1Logger.html#acdeaf9ecda4f2fd1b6ac845e188b34d6">00154</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classlog4tango_1_1Logger.html#acdeaf9ecda4f2fd1b6ac845e188b34d6" title="Log a message with debug level.">debug</a> (<span class="keyword">const</span> std::string&amp; message) {
<a name="l00155"></a>00155     <span class="keywordflow">if</span> (is_level_enabled(<a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461aa98b4453bf21b1af1c2d3d953887f393">Level::DEBUG</a>)) {
<a name="l00156"></a>00156       log_unconditionally(<a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461aa98b4453bf21b1af1c2d3d953887f393">Level::DEBUG</a>, message);
<a name="l00157"></a>00157     }
<a name="l00158"></a>00158   }
<a name="l00159"></a>00159 
<a name="l00164"></a><a class="code" href="classlog4tango_1_1Logger.html#a6ce8b32ab06c6b77f8aac562dabf9c1f">00164</a>   <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classlog4tango_1_1Logger.html#a6ce8b32ab06c6b77f8aac562dabf9c1f" title="Return true if the Logger will log messages with level DEBUG.">is_debug_enabled</a> (<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ 
<a name="l00165"></a>00165     <span class="keywordflow">return</span> is_level_enabled (<a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461aa98b4453bf21b1af1c2d3d953887f393">Level::DEBUG</a>);
<a name="l00166"></a>00166   };
<a name="l00167"></a>00167      
<a name="l00168"></a>00168 <span class="preprocessor">#ifndef LOG4TANGO_LOGGERS_USE_LOGSTREAM   </span>
<a name="l00169"></a>00169 <span class="preprocessor"></span>
<a name="l00173"></a><a class="code" href="classlog4tango_1_1Logger.html#a652427a4aed5322eb189f7409498cd18">00173</a>   <span class="keyword">inline</span> <a class="code" href="classlog4tango_1_1LoggerStream.html">LoggerStream</a> <a class="code" href="classlog4tango_1_1Logger.html#a652427a4aed5322eb189f7409498cd18" title="Return a LoggerStream with level DEBUG.">debug_stream</a> (<span class="keywordtype">void</span>) {
<a name="l00174"></a>00174     <span class="keywordflow">return</span> <a class="code" href="classlog4tango_1_1LoggerStream.html">LoggerStream</a>(*<span class="keyword">this</span>, <a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461aa98b4453bf21b1af1c2d3d953887f393">Level::DEBUG</a>, <span class="keyword">true</span>);
<a name="l00175"></a>00175   }
<a name="l00176"></a>00176 <span class="preprocessor">#else</span>
<a name="l00177"></a>00177 <span class="preprocessor"></span>
<a name="l00181"></a>00181   <span class="keyword">inline</span> <a class="code" href="classlog4tango_1_1LogStream.html">LogStream</a>&amp; debug_stream (<span class="keywordtype">void</span>) {
<a name="l00182"></a>00182     <span class="keywordflow">return</span> *_log_streams[_DEBUG_STREAM_ID];
<a name="l00183"></a>00183   }
<a name="l00184"></a>00184 <span class="preprocessor">#endif</span>
<a name="l00185"></a>00185 <span class="preprocessor"></span>
<a name="l00191"></a>00191   <span class="keywordtype">void</span> info (<span class="keyword">const</span> <span class="keywordtype">char</span>* string_format, ...);
<a name="l00192"></a>00192 
<a name="l00197"></a><a class="code" href="classlog4tango_1_1Logger.html#a987565b18e6ea9a2524d64c80759c2eb">00197</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classlog4tango_1_1Logger.html#a987565b18e6ea9a2524d64c80759c2eb" title="Log a message with info level.">info</a> (<span class="keyword">const</span> std::string&amp; message) {
<a name="l00198"></a>00198     <span class="keywordflow">if</span> (is_level_enabled(<a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461ae666ceb60dfca43381816abf33e2cd1b">Level::INFO</a>)) {
<a name="l00199"></a>00199       log_unconditionally(<a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461ae666ceb60dfca43381816abf33e2cd1b">Level::INFO</a>, message);
<a name="l00200"></a>00200     }
<a name="l00201"></a>00201   }
<a name="l00202"></a>00202 
<a name="l00207"></a><a class="code" href="classlog4tango_1_1Logger.html#af73279505009e650e615294711fe75fe">00207</a>   <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classlog4tango_1_1Logger.html#af73279505009e650e615294711fe75fe" title="Return true if the Logger will log messages with level INFO.">is_info_enabled</a> (<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ 
<a name="l00208"></a>00208     <span class="keywordflow">return</span> is_level_enabled(<a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461ae666ceb60dfca43381816abf33e2cd1b">Level::INFO</a>);
<a name="l00209"></a>00209   };
<a name="l00210"></a>00210 
<a name="l00211"></a>00211 <span class="preprocessor">#ifndef LOG4TANGO_LOGGERS_USE_LOGSTREAM   </span>
<a name="l00212"></a>00212 <span class="preprocessor"></span>
<a name="l00216"></a><a class="code" href="classlog4tango_1_1Logger.html#a22a2fd4d13e70e352a5f47dd02d33342">00216</a>   <span class="keyword">inline</span> <a class="code" href="classlog4tango_1_1LoggerStream.html">LoggerStream</a> <a class="code" href="classlog4tango_1_1Logger.html#a22a2fd4d13e70e352a5f47dd02d33342" title="Return a LoggerStream with level INFO.">info_stream</a> (<span class="keywordtype">void</span>) {
<a name="l00217"></a>00217     <span class="keywordflow">return</span> <a class="code" href="classlog4tango_1_1LoggerStream.html">LoggerStream</a>(*<span class="keyword">this</span>, <a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461ae666ceb60dfca43381816abf33e2cd1b">Level::INFO</a>, <span class="keyword">true</span>);
<a name="l00218"></a>00218   }
<a name="l00219"></a>00219 <span class="preprocessor">#else</span>
<a name="l00220"></a>00220 <span class="preprocessor"></span>
<a name="l00224"></a>00224   <span class="keyword">inline</span> <a class="code" href="classlog4tango_1_1LogStream.html">LogStream</a>&amp; info_stream (<span class="keywordtype">void</span>) {
<a name="l00225"></a>00225     <span class="keywordflow">return</span> *_log_streams[_INFO_STREAM_ID];
<a name="l00226"></a>00226   }
<a name="l00227"></a>00227 <span class="preprocessor">#endif</span>
<a name="l00228"></a>00228 <span class="preprocessor"></span>      
<a name="l00234"></a>00234   <span class="keywordtype">void</span> warn (<span class="keyword">const</span> <span class="keywordtype">char</span>* string_format, ...);
<a name="l00235"></a>00235 
<a name="l00240"></a><a class="code" href="classlog4tango_1_1Logger.html#a22646b15ebc33254f734e23280868345">00240</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classlog4tango_1_1Logger.html#a22646b15ebc33254f734e23280868345" title="Log a message with warn level.">warn</a> (<span class="keyword">const</span> std::string&amp; message) {
<a name="l00241"></a>00241     <span class="keywordflow">if</span> (is_level_enabled(<a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461ab0dfb37a2ad73d7b7f53a460819a2cc3">Level::WARN</a>)) {
<a name="l00242"></a>00242       log_unconditionally(<a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461ab0dfb37a2ad73d7b7f53a460819a2cc3">Level::WARN</a>, message);
<a name="l00243"></a>00243     }
<a name="l00244"></a>00244   }
<a name="l00245"></a>00245 
<a name="l00250"></a><a class="code" href="classlog4tango_1_1Logger.html#ac48da8e8705775526b0d94f974dd158d">00250</a>   <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classlog4tango_1_1Logger.html#ac48da8e8705775526b0d94f974dd158d" title="Return true if the Logger will log messages with level WARN.">is_warn_enabled</a> (<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ 
<a name="l00251"></a>00251     <span class="keywordflow">return</span> is_level_enabled(<a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461ab0dfb37a2ad73d7b7f53a460819a2cc3">Level::WARN</a>);
<a name="l00252"></a>00252   };
<a name="l00253"></a>00253 
<a name="l00254"></a>00254 <span class="preprocessor">#ifndef LOG4TANGO_LOGGERS_USE_LOGSTREAM   </span>
<a name="l00255"></a>00255 <span class="preprocessor"></span>
<a name="l00259"></a><a class="code" href="classlog4tango_1_1Logger.html#a223a0d6d82a1e054d07474e87b207bba">00259</a>   <span class="keyword">inline</span> <a class="code" href="classlog4tango_1_1LoggerStream.html">LoggerStream</a> <a class="code" href="classlog4tango_1_1Logger.html#a223a0d6d82a1e054d07474e87b207bba" title="Return a LoggerStream with level WARN.">warn_stream</a> (<span class="keywordtype">void</span>) {
<a name="l00260"></a>00260     <span class="keywordflow">return</span> <a class="code" href="classlog4tango_1_1LoggerStream.html">LoggerStream</a>(*<span class="keyword">this</span>, <a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461ab0dfb37a2ad73d7b7f53a460819a2cc3">Level::WARN</a>, <span class="keyword">true</span>);
<a name="l00261"></a>00261   };
<a name="l00262"></a>00262 <span class="preprocessor">#else</span>
<a name="l00263"></a>00263 <span class="preprocessor"></span>
<a name="l00267"></a>00267   <span class="keyword">inline</span> <a class="code" href="classlog4tango_1_1LogStream.html">LogStream</a>&amp; warn_stream (<span class="keywordtype">void</span>) {
<a name="l00268"></a>00268     <span class="keywordflow">return</span> *_log_streams[_WARN_STREAM_ID];
<a name="l00269"></a>00269   }
<a name="l00270"></a>00270 <span class="preprocessor">#endif</span>
<a name="l00271"></a>00271 <span class="preprocessor"></span>
<a name="l00277"></a>00277   <span class="keywordtype">void</span> error (<span class="keyword">const</span> <span class="keywordtype">char</span>* string_format, ...);
<a name="l00278"></a>00278 
<a name="l00283"></a><a class="code" href="classlog4tango_1_1Logger.html#a7d587fb218937b9c525f5c48e5f0e230">00283</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classlog4tango_1_1Logger.html#a7d587fb218937b9c525f5c48e5f0e230" title="Log a message with error level.">error</a> (<span class="keyword">const</span> std::string&amp; message) {
<a name="l00284"></a>00284     <span class="keywordflow">if</span> (is_level_enabled(<a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461ae9f52151dce772e7a7ee87bc824b1fdf">Level::ERROR</a>)) {
<a name="l00285"></a>00285       log_unconditionally(<a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461ae9f52151dce772e7a7ee87bc824b1fdf">Level::ERROR</a>, message);
<a name="l00286"></a>00286     }
<a name="l00287"></a>00287   }
<a name="l00288"></a>00288 
<a name="l00293"></a><a class="code" href="classlog4tango_1_1Logger.html#ab2ec2debd2d3024293a0d873af8e86b3">00293</a>   <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classlog4tango_1_1Logger.html#ab2ec2debd2d3024293a0d873af8e86b3" title="Return true if the Logger will log messages with level ERROR.">is_error_enabled</a> (<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ 
<a name="l00294"></a>00294     <span class="keywordflow">return</span> is_level_enabled(<a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461ae9f52151dce772e7a7ee87bc824b1fdf">Level::ERROR</a>);
<a name="l00295"></a>00295   };
<a name="l00296"></a>00296 
<a name="l00297"></a>00297 <span class="preprocessor">#ifndef LOG4TANGO_LOGGERS_USE_LOGSTREAM   </span>
<a name="l00298"></a>00298 <span class="preprocessor"></span>
<a name="l00302"></a><a class="code" href="classlog4tango_1_1Logger.html#a09c866cc0bfb1de324c676617234f4fd">00302</a>   <span class="keyword">inline</span> <a class="code" href="classlog4tango_1_1LoggerStream.html">LoggerStream</a> <a class="code" href="classlog4tango_1_1Logger.html#a09c866cc0bfb1de324c676617234f4fd" title="Return a LoggerStream with level ERROR.">error_stream</a> (<span class="keywordtype">void</span>) {
<a name="l00303"></a>00303       <span class="keywordflow">return</span> <a class="code" href="classlog4tango_1_1LoggerStream.html">LoggerStream</a>(*<span class="keyword">this</span>, <a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461ae9f52151dce772e7a7ee87bc824b1fdf">Level::ERROR</a>, <span class="keyword">true</span>);
<a name="l00304"></a>00304   };
<a name="l00305"></a>00305 <span class="preprocessor">#else</span>
<a name="l00306"></a>00306 <span class="preprocessor"></span>
<a name="l00310"></a>00310   <span class="keyword">inline</span> <a class="code" href="classlog4tango_1_1LogStream.html">LogStream</a>&amp; error_stream (<span class="keywordtype">void</span>) {
<a name="l00311"></a>00311     <span class="keywordflow">return</span> *_log_streams[_ERROR_STREAM_ID];
<a name="l00312"></a>00312   }
<a name="l00313"></a>00313 <span class="preprocessor">#endif</span>
<a name="l00314"></a>00314 <span class="preprocessor"></span>
<a name="l00320"></a>00320   <span class="keywordtype">void</span> fatal(<span class="keyword">const</span> <span class="keywordtype">char</span>* string_format, ...);
<a name="l00321"></a>00321 
<a name="l00326"></a><a class="code" href="classlog4tango_1_1Logger.html#a56287e6a0a500f74d9fd7bc09f612111">00326</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classlog4tango_1_1Logger.html#a56287e6a0a500f74d9fd7bc09f612111" title="Log a message with fatal level.">fatal</a> (<span class="keyword">const</span> std::string&amp; message) {
<a name="l00327"></a>00327     <span class="keywordflow">if</span> (is_level_enabled(<a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461a58fb50808d864278c4127f5c8ac5406c">Level::FATAL</a>)) {
<a name="l00328"></a>00328       log_unconditionally(<a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461a58fb50808d864278c4127f5c8ac5406c">Level::FATAL</a>, message);
<a name="l00329"></a>00329     }
<a name="l00330"></a>00330   }
<a name="l00331"></a>00331 
<a name="l00336"></a><a class="code" href="classlog4tango_1_1Logger.html#a16213b0ab5912487ad2eb62c4337900b">00336</a>   <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classlog4tango_1_1Logger.html#a16213b0ab5912487ad2eb62c4337900b" title="Return true if the Logger will log messages with level FATAL.">is_fatal_enabled</a> (<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ 
<a name="l00337"></a>00337     <span class="keywordflow">return</span> is_level_enabled(<a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461a58fb50808d864278c4127f5c8ac5406c">Level::FATAL</a>);
<a name="l00338"></a>00338   };
<a name="l00339"></a>00339   
<a name="l00340"></a>00340 <span class="preprocessor">#ifndef LOG4TANGO_LOGGERS_USE_LOGSTREAM   </span>
<a name="l00341"></a>00341 <span class="preprocessor"></span>
<a name="l00345"></a><a class="code" href="classlog4tango_1_1Logger.html#ae734bcc83b3b3687a073edaacd5c74f0">00345</a>   <span class="keyword">inline</span> <a class="code" href="classlog4tango_1_1LoggerStream.html">LoggerStream</a> <a class="code" href="classlog4tango_1_1Logger.html#ae734bcc83b3b3687a073edaacd5c74f0" title="Return a LoggerStream with level FATAL.">fatal_stream</a> (<span class="keywordtype">void</span>) {
<a name="l00346"></a>00346     <span class="keywordflow">return</span> <a class="code" href="classlog4tango_1_1LoggerStream.html">LoggerStream</a>(*<span class="keyword">this</span>, <a class="code" href="classlog4tango_1_1Level.html#ad9edd63020b6becc9aef8802c48eb461a58fb50808d864278c4127f5c8ac5406c">Level::FATAL</a>, <span class="keyword">true</span>);
<a name="l00347"></a>00347   };
<a name="l00348"></a>00348 <span class="preprocessor">#else</span>
<a name="l00349"></a>00349 <span class="preprocessor"></span>
<a name="l00353"></a>00353   <span class="keyword">inline</span> <a class="code" href="classlog4tango_1_1LogStream.html">LogStream</a>&amp; fatal_stream (<span class="keywordtype">void</span>) {
<a name="l00354"></a>00354     <span class="keywordflow">return</span> *_log_streams[_FATAL_STREAM_ID];
<a name="l00355"></a>00355   }
<a name="l00356"></a>00356 <span class="preprocessor">#endif</span>
<a name="l00357"></a>00357 <span class="preprocessor"></span>
<a name="l00358"></a>00358 <span class="preprocessor">#ifndef LOG4TANGO_LOGGERS_USE_LOGSTREAM   </span>
<a name="l00359"></a>00359 <span class="preprocessor"></span>
<a name="l00365"></a><a class="code" href="classlog4tango_1_1Logger.html#a34b294678a690630721e8824f16020de">00365</a>   <span class="keyword">inline</span> <a class="code" href="classlog4tango_1_1LoggerStream.html">LoggerStream</a> <a class="code" href="classlog4tango_1_1Logger.html#a34b294678a690630721e8824f16020de" title="Return a LoggerStream with given Level.">get_stream</a> (<a class="code" href="classlog4tango_1_1Level.html#aa708c09b6a19a8cc8a3b19631561ca99" title="The type of Level Values.">Level::Value</a> level, <span class="keywordtype">bool</span> filter = <span class="keyword">true</span>) {
<a name="l00366"></a>00366     <span class="keywordflow">return</span> <a class="code" href="classlog4tango_1_1LoggerStream.html">LoggerStream</a>(*<span class="keyword">this</span>, level, filter);
<a name="l00367"></a>00367   }
<a name="l00368"></a>00368 <span class="preprocessor">#endif</span>
<a name="l00369"></a>00369 <span class="preprocessor"></span>
<a name="l00370"></a>00370 <span class="keyword">protected</span>:
<a name="l00371"></a>00371 
<a name="l00377"></a>00377   <span class="keywordtype">void</span> call_appenders (<span class="keyword">const</span> <a class="code" href="structlog4tango_1_1LoggingEvent.html" title="The internal representation of logging events.">LoggingEvent</a>&amp; event);
<a name="l00378"></a>00378   
<a name="l00379"></a>00379 
<a name="l00380"></a>00380 <span class="keyword">private</span>:
<a name="l00381"></a>00381 
<a name="l00382"></a>00382 <span class="preprocessor">#ifdef LOG4TANGO_LOGGERS_USE_LOGSTREAM</span>
<a name="l00383"></a>00383 <span class="preprocessor"></span>
<a name="l00384"></a>00384   <span class="keyword">enum</span> {
<a name="l00385"></a>00385     _FATAL_STREAM_ID = 0,
<a name="l00386"></a>00386     _ERROR_STREAM_ID = 1,
<a name="l00387"></a>00387     _WARN_STREAM_ID  = 2,
<a name="l00388"></a>00388     _INFO_STREAM_ID  = 3,
<a name="l00389"></a>00389     _DEBUG_STREAM_ID = 4
<a name="l00390"></a>00390   };
<a name="l00391"></a>00391 <span class="preprocessor">#endif</span>
<a name="l00392"></a>00392 <span class="preprocessor"></span>
<a name="l00394"></a>00394   <span class="keyword">const</span> std::string _name;
<a name="l00395"></a>00395 
<a name="l00397"></a>00397   <a class="code" href="classlog4tango_1_1Level.html#aa708c09b6a19a8cc8a3b19631561ca99" title="The type of Level Values.">Level::Value</a> _level;
<a name="l00398"></a>00398 
<a name="l00399"></a>00399 <span class="preprocessor">#ifdef LOG4TANGO_LOGGERS_USE_LOGSTREAM</span>
<a name="l00400"></a>00400 <span class="preprocessor"></span>
<a name="l00401"></a>00401   LogStream *_log_streams[5];
<a name="l00402"></a>00402 <span class="preprocessor">#endif</span>
<a name="l00403"></a>00403 <span class="preprocessor"></span>
<a name="l00404"></a>00404   <span class="comment">/* prevent copying and assignment */</span>
<a name="l00405"></a>00405   <a class="code" href="namespacelog4tango.html#a32cdd650c4bcacf2d8fbd74caae3205d">Logger</a> (<span class="keyword">const</span> <a class="code" href="namespacelog4tango.html#a32cdd650c4bcacf2d8fbd74caae3205d">Logger</a>&amp;);
<a name="l00406"></a>00406   <a class="code" href="namespacelog4tango.html#a32cdd650c4bcacf2d8fbd74caae3205d">Logger</a>&amp; operator= (<span class="keyword">const</span> <a class="code" href="namespacelog4tango.html#a32cdd650c4bcacf2d8fbd74caae3205d">Logger</a>&amp;);
<a name="l00407"></a>00407 };
<a name="l00408"></a>00408 
<a name="l00409"></a>00409 } <span class="comment">// namespace log4tango</span>
<a name="l00410"></a>00410 
<a name="l00411"></a>00411 <span class="preprocessor">#endif // _LOG4TANGO_LOGGER_H</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sat Dec 3 2011 12:45:21 for log4tango by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>