<!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>GNU CommonC++: applog.h 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.6.3 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main 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> <li><a href="examples.html"><span>Examples</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>applog.h</h1><a href="applog_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (C) 2005-2009 Angelo Naselli, Penta Engineering s.r.l.</span> <a name="l00002"></a>00002 <span class="comment">//</span> <a name="l00003"></a>00003 <span class="comment">// This program is free software; you can redistribute it and/or modify</span> <a name="l00004"></a>00004 <span class="comment">// it under the terms of the GNU General Public License as published by</span> <a name="l00005"></a>00005 <span class="comment">// the Free Software Foundation; either version 2 of the License, or</span> <a name="l00006"></a>00006 <span class="comment">// (at your option) any later version.</span> <a name="l00007"></a>00007 <span class="comment">//</span> <a name="l00008"></a>00008 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00009"></a>00009 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> <a name="l00010"></a>00010 <span class="comment">// GNU General Public License for more details.</span> <a name="l00011"></a>00011 <span class="comment">//</span> <a name="l00012"></a>00012 <span class="comment">// You should have received a copy of the GNU General Public License</span> <a name="l00013"></a>00013 <span class="comment">// along with this program; if not, write to the Free Software</span> <a name="l00014"></a>00014 <span class="comment">// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</span> <a name="l00015"></a>00015 <span class="comment">//</span> <a name="l00016"></a>00016 <span class="comment">// As a special exception, you may use this file as part of a free software</span> <a name="l00017"></a>00017 <span class="comment">// library without restriction. Specifically, if other files instantiate</span> <a name="l00018"></a>00018 <span class="comment">// templates or use macros or inline functions from this file, or you compile</span> <a name="l00019"></a>00019 <span class="comment">// this file and link it with other files to produce an executable, this</span> <a name="l00020"></a>00020 <span class="comment">// file does not by itself cause the resulting executable to be covered by</span> <a name="l00021"></a>00021 <span class="comment">// the GNU General Public License. This exception does not however</span> <a name="l00022"></a>00022 <span class="comment">// invalidate any other reasons why the executable file might be covered by</span> <a name="l00023"></a>00023 <span class="comment">// the GNU General Public License.</span> <a name="l00024"></a>00024 <span class="comment">//</span> <a name="l00025"></a>00025 <span class="comment">// This exception applies only to the code released under the name GNU</span> <a name="l00026"></a>00026 <span class="comment">// Common C++. If you copy code from other releases into a copy of GNU</span> <a name="l00027"></a>00027 <span class="comment">// Common C++, as the General Public License permits, the exception does</span> <a name="l00028"></a>00028 <span class="comment">// not apply to the code that you add in this way. To avoid misleading</span> <a name="l00029"></a>00029 <span class="comment">// anyone as to the status of such modified files, you must delete</span> <a name="l00030"></a>00030 <span class="comment">// this exception notice from them.</span> <a name="l00031"></a>00031 <span class="comment">//</span> <a name="l00032"></a>00032 <span class="comment">// If you write modifications of your own for GNU Common C++, it is your choice</span> <a name="l00033"></a>00033 <span class="comment">// whether to permit this exception to apply to your modifications.</span> <a name="l00034"></a>00034 <span class="comment">// If you do not wish that, delete this exception notice.</span> <a name="l00035"></a>00035 <span class="comment">//</span> <a name="l00036"></a>00036 <a name="l00043"></a>00043 <span class="preprocessor">#ifndef ___APPLOG_H___</span> <a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#define ___APPLOG_H___</span> <a name="l00045"></a>00045 <span class="preprocessor"></span> <a name="l00046"></a>00046 <span class="preprocessor">#ifndef CCXX_SLOG_H_</span> <a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#include <<a class="code" href="slog_8h.html" title="System logging facilities abstraction.">cc++/slog.h</a>></span> <a name="l00048"></a>00048 <span class="preprocessor">#endif</span> <a name="l00049"></a>00049 <span class="preprocessor"></span> <a name="l00050"></a>00050 <span class="preprocessor">#include <<a class="code" href="exception_8h.html" title="GNU Common C++ exception model base classes.">cc++/exception.h</a>></span> <a name="l00051"></a>00051 <a name="l00052"></a>00052 <span class="preprocessor">#include <string></span> <a name="l00053"></a>00053 <span class="preprocessor">#include <sstream></span> <a name="l00054"></a>00054 <span class="preprocessor">#include <iostream></span> <a name="l00055"></a>00055 <span class="preprocessor">#include <map></span> <a name="l00056"></a>00056 <a name="l00057"></a>00057 <span class="preprocessor">#ifdef CCXX_NAMESPACES</span> <a name="l00058"></a>00058 <span class="preprocessor"></span><span class="keyword">using namespace </span>std; <a name="l00059"></a>00059 <a name="l00060"></a>00060 <span class="keyword">namespace </span>ost <a name="l00061"></a>00061 { <a name="l00062"></a>00062 <span class="preprocessor">#endif</span> <a name="l00063"></a>00063 <span class="preprocessor"></span> <a name="l00071"></a><a class="code" href="classost_1_1_h_e_xdump.html">00071</a> <span class="keyword">class </span><a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <a class="code" href="classost_1_1_h_e_xdump.html" title="Produces a dump of a buffer in a hexdump way with its code Ascii translation and...">HEXdump</a> <a name="l00072"></a>00072 { <a name="l00073"></a>00073 <span class="keyword">protected</span>: <a name="l00077"></a><a class="code" href="classost_1_1_h_e_xdump.html#a838834d8a6e61937fb604fa13eee60fb">00077</a> std::string _str; <a name="l00078"></a>00078 <a name="l00079"></a>00079 <span class="keyword">public</span>: <a name="l00080"></a>00080 <span class="comment">// max_len indica dove troncare la stampa del buffer. 0 non tronca.</span> <a name="l00089"></a>00089 <span class="comment"></span> <a class="code" href="classost_1_1_h_e_xdump.html" title="Produces a dump of a buffer in a hexdump way with its code Ascii translation and...">HEXdump</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buffer, <span class="keywordtype">int</span> buff_len, <span class="keywordtype">int</span> max_len = 200); <a name="l00090"></a>00090 <a name="l00094"></a><a class="code" href="classost_1_1_h_e_xdump.html#abd509f740608db0e1a9bad4a77b8fbb6">00094</a> <span class="keyword">virtual</span> <a class="code" href="classost_1_1_h_e_xdump.html#abd509f740608db0e1a9bad4a77b8fbb6" title="HEXdump destructor.">~HEXdump</a>() { _str = string();} <a name="l00095"></a>00095 <a name="l00100"></a><a class="code" href="classost_1_1_h_e_xdump.html#a78ad113b39885750e7a791b56efc8112">00100</a> <span class="keyword">const</span> <span class="keywordtype">char</span> * c_str()<span class="keyword"> const</span> <a name="l00101"></a>00101 <span class="keyword"> </span>{ <a name="l00102"></a>00102 <span class="keywordflow">return</span> _str.c_str(); <a name="l00103"></a>00103 } <a name="l00104"></a>00104 <a name="l00108"></a><a class="code" href="classost_1_1_h_e_xdump.html#a278b3d7b7e72f1c6f795fca7fbb24ab5">00108</a> std::string str() <a name="l00109"></a>00109 { <a name="l00110"></a>00110 <span class="keywordflow">return</span> _str; <a name="l00111"></a>00111 } <a name="l00112"></a>00112 <a name="l00118"></a><a class="code" href="classost_1_1_h_e_xdump.html#a603863bee72a824a89c3baf889825fd7">00118</a> <span class="keyword">friend</span> std::ostream& <a class="code" href="namespaceost.html#a43b65f3c2266eb63ba22c1ff73a6e20b">operator<< </a>(std::ostream& out, <span class="keyword">const</span> <a class="code" href="classost_1_1_h_e_xdump.html" title="Produces a dump of a buffer in a hexdump way with its code Ascii translation and...">HEXdump</a> &hd) <a name="l00119"></a>00119 { <a name="l00120"></a>00120 out << hd.<a class="code" href="classost_1_1_h_e_xdump.html#a78ad113b39885750e7a791b56efc8112" title="const char* cast provided for conveneince.">c_str</a>(); <a name="l00121"></a>00121 <span class="keywordflow">return</span> out; <a name="l00122"></a>00122 } <a name="l00123"></a>00123 <a name="l00124"></a>00124 }; <a name="l00125"></a>00125 <a name="l00130"></a><a class="code" href="classost_1_1_app_log_exception.html">00130</a> <span class="keyword">class </span><a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <a class="code" href="classost_1_1_app_log_exception.html" title="Applog exception, used for memory problems at the moment.">AppLogException</a> : <span class="keyword">public</span> ost::<a class="code" href="classost_1_1_exception.html" title="Mainline exception handler, this is the root for all Common C++ exceptions and assures...">Exception</a> <a name="l00131"></a>00131 { <a name="l00132"></a>00132 <span class="keyword">public</span>: <a name="l00137"></a><a class="code" href="classost_1_1_app_log_exception.html#a3be83047a343deee4d17ddc999a7c407">00137</a> <a class="code" href="classost_1_1_app_log_exception.html#a3be83047a343deee4d17ddc999a7c407" title="Constructor.">AppLogException</a>(<span class="keyword">const</span> std::string &what_arg) : ost::<a class="code" href="classost_1_1_exception.html" title="Mainline exception handler, this is the root for all Common C++ exceptions and assures...">Exception</a>(what_arg) {}; <a name="l00138"></a>00138 <a name="l00139"></a>00139 }; <a name="l00140"></a>00140 <a name="l00141"></a>00141 <span class="keyword">class </span>AppLogPrivate; <a name="l00142"></a>00142 <a name="l00171"></a><a class="code" href="classost_1_1_app_log.html">00171</a> <span class="keyword">class </span><a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> : <span class="keyword">protected</span> streambuf, <span class="keyword">public</span> ostream <a name="l00172"></a>00172 { <a name="l00173"></a>00173 <span class="keyword">protected</span>: <a name="l00174"></a>00174 <span class="comment">// d pointer</span> <a name="l00175"></a><a class="code" href="classost_1_1_app_log.html#addfc3b19ad63afdec4c97de6761ddc81">00175</a> AppLogPrivate *d; <a name="l00176"></a>00176 <span class="keywordtype">void</span> writeLog(<span class="keywordtype">bool</span> endOfLine = <span class="keyword">true</span>); <a name="l00177"></a><a class="code" href="classost_1_1_app_log.html#a6856a1e8dda262714294257163156196">00177</a> <span class="keyword">static</span> map<string, Slog::Level> *assoc; <a name="l00178"></a>00178 <a name="l00179"></a>00179 <span class="keyword">public</span>: <a name="l00183"></a><a class="code" href="classost_1_1_app_log_1_1_ident.html">00183</a> <span class="keyword">class </span><a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <a class="code" href="classost_1_1_app_log_1_1_ident.html" title="Ident class that represents module name.">Ident</a> <a name="l00184"></a>00184 { <a name="l00185"></a>00185 <span class="keyword">private</span>: <a name="l00186"></a>00186 std::string _ident; <a name="l00187"></a>00187 <span class="keyword">public</span>: <a name="l00188"></a>00188 <a name="l00192"></a><a class="code" href="classost_1_1_app_log_1_1_ident.html#a6458be4fe6aacb582b6822b6cbfe6e04">00192</a> <a class="code" href="classost_1_1_app_log_1_1_ident.html#a6458be4fe6aacb582b6822b6cbfe6e04" title="Constructor.">Ident</a>() {}; <a name="l00193"></a>00193 <a name="l00197"></a><a class="code" href="classost_1_1_app_log_1_1_ident.html#a9b68fbacbdfa3bf3994bc6972cfe0bd2">00197</a> <a class="code" href="classost_1_1_app_log_1_1_ident.html#a9b68fbacbdfa3bf3994bc6972cfe0bd2" title="Desctructor.">~Ident</a>() {}; <a name="l00198"></a>00198 <a name="l00202"></a><a class="code" href="classost_1_1_app_log_1_1_ident.html#ac3e34ed09c3d8ccd707252b88a32ee93">00202</a> <a class="code" href="classost_1_1_app_log_1_1_ident.html#ac3e34ed09c3d8ccd707252b88a32ee93" title="Copy constructor.">Ident</a>(<a class="code" href="classost_1_1_app_log_1_1_ident.html" title="Ident class that represents module name.">Ident</a>& <span class="keywordtype">id</span>) {_ident = <span class="keywordtype">id</span>._ident;} <a name="l00203"></a>00203 <a name="l00207"></a><a class="code" href="classost_1_1_app_log_1_1_ident.html#aff90fa408df309cf8f4297879a8696d5">00207</a> <a class="code" href="classost_1_1_app_log_1_1_ident.html#aff90fa408df309cf8f4297879a8696d5" title="const char* constructor, provided for convenience.">Ident</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *str) : _ident(str) {}; <a name="l00208"></a>00208 <a name="l00212"></a><a class="code" href="classost_1_1_app_log_1_1_ident.html#af41c54dd075cebc48c9de7060d3a8f58">00212</a> std::string& <a class="code" href="classost_1_1_app_log_1_1_ident.html#af41c54dd075cebc48c9de7060d3a8f58" title="std::string cast.">str</a>() {<span class="keywordflow">return</span> _ident;} <a name="l00213"></a>00213 <a name="l00217"></a><a class="code" href="classost_1_1_app_log_1_1_ident.html#a6fffb0b2292a5ae980195a299bccb622">00217</a> <a class="code" href="classost_1_1_app_log_1_1_ident.html" title="Ident class that represents module name.">Ident</a>& operator= (std::string &st) {_ident = st; <span class="keywordflow">return</span> *<span class="keyword">this</span>;} <a name="l00218"></a>00218 <a name="l00222"></a><a class="code" href="classost_1_1_app_log_1_1_ident.html#a0cb957bd54e54ef621a07a3e1b8fd0b0">00222</a> <a class="code" href="classost_1_1_app_log_1_1_ident.html" title="Ident class that represents module name.">Ident</a>& operator= (<span class="keyword">const</span> <span class="keywordtype">char</span> str[]) {_ident = str; <span class="keywordflow">return</span> *<span class="keyword">this</span>;} <a name="l00223"></a>00223 <a name="l00227"></a><a class="code" href="classost_1_1_app_log_1_1_ident.html#a4c75892c51ee36c04b5c0f0e79920b3a">00227</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classost_1_1_app_log_1_1_ident.html#a4c75892c51ee36c04b5c0f0e79920b3a" title="const char* cast provided for conveneince.">c_str</a>() {<span class="keywordflow">return</span> _ident.c_str();} <a name="l00228"></a>00228 }; <a name="l00229"></a>00229 <a name="l00230"></a>00230 <span class="preprocessor">#ifndef WIN32</span> <a name="l00231"></a>00231 <span class="preprocessor"></span> <a name="l00238"></a>00238 <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* logFileName = NULL, <span class="keywordtype">bool</span> logDirectly = <span class="keyword">false</span> , <span class="keywordtype">bool</span> usePipe = <span class="keyword">false</span>); <a name="l00239"></a>00239 <span class="preprocessor">#else</span> <a name="l00240"></a>00240 <span class="preprocessor"></span> <a name="l00246"></a>00246 <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* logFileName = NULL, <span class="keywordtype">bool</span> logDirectly = <span class="keyword">false</span>); <a name="l00247"></a>00247 <span class="preprocessor">#endif</span> <a name="l00248"></a>00248 <span class="preprocessor"></span> <a name="l00251"></a>00251 <span class="keyword">virtual</span> ~<a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a>(); <a name="l00252"></a>00252 <a name="l00257"></a>00257 <span class="keywordtype">void</span> subscribe(); <a name="l00258"></a>00258 <a name="l00262"></a>00262 <span class="keywordtype">void</span> unsubscribe(); <a name="l00263"></a>00263 <a name="l00264"></a>00264 <span class="preprocessor">#ifndef WIN32</span> <a name="l00265"></a>00265 <span class="preprocessor"></span> <a name="l00272"></a>00272 <span class="keywordtype">void</span> logFileName(<span class="keyword">const</span> <span class="keywordtype">char</span>* FileName, <span class="keywordtype">bool</span> logDirectly = <span class="keyword">false</span>, <span class="keywordtype">bool</span> usePipe = <span class="keyword">false</span>); <a name="l00273"></a>00273 <span class="preprocessor">#else</span> <a name="l00274"></a>00274 <span class="preprocessor"></span> <a name="l00280"></a>00280 <span class="keywordtype">void</span> logFileName(<span class="keyword">const</span> <span class="keywordtype">char</span>* FileName, <span class="keywordtype">bool</span> logDirectly = <span class="keyword">false</span>); <a name="l00281"></a>00281 <span class="preprocessor">#endif</span> <a name="l00282"></a>00282 <span class="preprocessor"></span> <a name="l00285"></a>00285 <span class="keywordtype">void</span> close(<span class="keywordtype">void</span>); <a name="l00286"></a>00286 <a name="l00291"></a>00291 <span class="keywordtype">void</span> level(<a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7a">Slog::Level</a> enable); <a name="l00292"></a>00292 <a name="l00297"></a>00297 <span class="keywordtype">void</span> clogEnable(<span class="keywordtype">bool</span> en = <span class="keyword">true</span>); <a name="l00298"></a>00298 <a name="l00303"></a>00303 <span class="keywordtype">void</span> slogEnable(<span class="keywordtype">bool</span> en = <span class="keyword">true</span>); <a name="l00304"></a>00304 <a name="l00310"></a>00310 <span class="keywordtype">void</span> identLevel(<span class="keyword">const</span> <span class="keywordtype">char</span> *ident, <a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7a">Slog::Level</a> level); <a name="l00311"></a>00311 <a name="l00316"></a>00316 <span class="keywordtype">void</span> open(<span class="keyword">const</span> <span class="keywordtype">char</span> *ident); <a name="l00317"></a>00317 <a name="l00323"></a>00323 <span class="keyword">virtual</span> <span class="keywordtype">int</span> overflow(<span class="keywordtype">int</span> c); <a name="l00324"></a>00324 <a name="l00328"></a>00328 <span class="keyword">virtual</span> <span class="keywordtype">int</span> sync(); <a name="l00329"></a>00329 <a name="l00330"></a>00330 <span class="preprocessor">#ifdef HAVE_SNPRINTF</span> <a name="l00331"></a>00331 <span class="preprocessor"></span> <a name="l00336"></a>00336 <span class="keywordtype">void</span> <a class="code" href="namespaceost.html#a83dc8550b8ed793d67cdd61eb19c92ed" title="Manipulator for emerg level.">emerg</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *format, ...); <a name="l00337"></a>00337 <a name="l00342"></a>00342 <span class="keywordtype">void</span> <a class="code" href="namespaceost.html#a1f2a71206461b2144eaf6a3e7150e5dd" title="Manipulator for alert level.">alert</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *format, ...); <a name="l00343"></a>00343 <a name="l00348"></a>00348 <span class="keywordtype">void</span> <a class="code" href="namespaceost.html#a5e16a3488a940fdefd3b54e9f472668b" title="Manipulator for critical level.">critical</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *format, ...); <a name="l00349"></a>00349 <a name="l00354"></a>00354 <span class="keywordtype">void</span> <a class="code" href="namespaceost.html#a61faeec2dc6ec946dc3e98979bd93124" title="Manipulator for error level.">error</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *format, ...); <a name="l00355"></a>00355 <a name="l00360"></a>00360 <span class="keywordtype">void</span> <a class="code" href="namespaceost.html#a24dc8ba691e7376d9c19762e2701fa63" title="Manipulator for warn level.">warn</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *format, ...); <a name="l00361"></a>00361 <a name="l00366"></a>00366 <span class="keywordtype">void</span> <a class="code" href="namespaceost.html#a14670ea356ba2430da0221cd72532cdf" title="Manipulator for notice level.">notice</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *format, ...); <a name="l00367"></a>00367 <a name="l00372"></a>00372 <span class="keywordtype">void</span> <a class="code" href="namespaceost.html#a622b45d2f58d84c1d8c364763a97c2da" title="Manipulator for info level.">info</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *format, ...); <a name="l00373"></a>00373 <a name="l00378"></a>00378 <span class="keywordtype">void</span> <a class="code" href="namespaceost.html#a60294b8e0dd5a8812580edd0446ac11a" title="Manipulator for debug level.">debug</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *format, ...); <a name="l00379"></a>00379 <span class="preprocessor">#endif</span> <a name="l00380"></a>00380 <span class="preprocessor"></span> <a name="l00387"></a>00387 <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> &operator()(<span class="keyword">const</span> <span class="keywordtype">char</span> *ident, <a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7a">Slog::Level</a> level = <a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7aaf82cf7bb589d776186fbd0ab7b345f6e">Slog::levelError</a>); <a name="l00388"></a>00388 <a name="l00394"></a><a class="code" href="classost_1_1_app_log.html#a673f799d6c818a46dac948e08dbefeb1">00394</a> <span class="keyword">inline</span> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a>& operator()(<a class="code" href="classost_1_1_app_log_1_1_ident.html" title="Ident class that represents module name.">Ident</a> &ident) <a name="l00395"></a>00395 { <a name="l00396"></a>00396 open(ident.<a class="code" href="classost_1_1_app_log_1_1_ident.html#a4c75892c51ee36c04b5c0f0e79920b3a" title="const char* cast provided for conveneince.">c_str</a>()); <a name="l00397"></a>00397 <span class="keywordflow">return</span> *<span class="keyword">this</span>; <a name="l00398"></a>00398 } <a name="l00399"></a>00399 <a name="l00405"></a>00405 <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> &operator()(<a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7a">Slog::Level</a> level); <a name="l00406"></a>00406 <a name="l00412"></a>00412 <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a>& <a class="code" href="namespaceost.html#a43b65f3c2266eb63ba22c1ff73a6e20b">operator<< </a>(<a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a>& (*pfManipulator)(<a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a>&)); <a name="l00413"></a>00413 <a name="l00419"></a>00419 <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a>& <a class="code" href="namespaceost.html#a43b65f3c2266eb63ba22c1ff73a6e20b">operator<< </a>(ostream& (*pfManipulator)(ostream&)); <a name="l00420"></a>00420 <a name="l00421"></a><a class="code" href="classost_1_1_app_log.html#a384f03d87c24cce6657ca9b2628ffabc">00421</a> <span class="keyword">friend</span> ostream& <a class="code" href="namespaceost.html#a43b65f3c2266eb63ba22c1ff73a6e20b">operator << </a>(ostream &out, <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> & al) <a name="l00422"></a>00422 { <a name="l00423"></a>00423 <span class="keywordflow">return</span> al; <a name="l00424"></a>00424 } <a name="l00425"></a>00425 <a name="l00431"></a><a class="code" href="classost_1_1_app_log.html#a5c9718f106182a1ec8b659c47c71a784">00431</a> <span class="keyword">inline</span> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a>& <a class="code" href="namespaceost.html#a43b65f3c2266eb63ba22c1ff73a6e20b">operator<< </a>(<a class="code" href="classost_1_1_app_log_1_1_ident.html" title="Ident class that represents module name.">Ident</a> &ident) <a name="l00432"></a>00432 { <a name="l00433"></a>00433 open(ident.<a class="code" href="classost_1_1_app_log_1_1_ident.html#a4c75892c51ee36c04b5c0f0e79920b3a" title="const char* cast provided for conveneince.">c_str</a>()); <a name="l00434"></a>00434 <span class="keywordflow">return</span> *<span class="keyword">this</span>; <a name="l00435"></a>00435 } <a name="l00436"></a>00436 <a name="l00437"></a>00437 <a name="l00442"></a><a class="code" href="classost_1_1_app_log.html#accb6db72e959657f69c0d77c748f8b59">00442</a> <span class="keyword">inline</span> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> &<a class="code" href="namespaceost.html#a24dc8ba691e7376d9c19762e2701fa63" title="Manipulator for warn level.">warn</a>(<span class="keywordtype">void</span>) <a name="l00443"></a>00443 {<span class="keywordflow">return</span> operator()(<a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7aa568c02bbd98a58f508a83334c65ffcea">Slog::levelWarning</a>);} <a name="l00444"></a>00444 <a name="l00449"></a><a class="code" href="classost_1_1_app_log.html#ab99b34d86684217522da9c40564cdb14">00449</a> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> &<a class="code" href="namespaceost.html#a61faeec2dc6ec946dc3e98979bd93124" title="Manipulator for error level.">error</a>(<span class="keywordtype">void</span>) <a name="l00450"></a>00450 { <span class="keywordflow">return</span> operator()(<a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7aaf82cf7bb589d776186fbd0ab7b345f6e">Slog::levelError</a>);} <a name="l00451"></a>00451 <a name="l00456"></a><a class="code" href="classost_1_1_app_log.html#af1bf30ea9b0d324cf66c04f2386b4390">00456</a> <span class="keyword">inline</span> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> &<a class="code" href="namespaceost.html#a60294b8e0dd5a8812580edd0446ac11a" title="Manipulator for debug level.">debug</a>(<span class="keywordtype">void</span>) <a name="l00457"></a>00457 {<span class="keywordflow">return</span> operator()(<a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7aa7d9ce368944e6852d05730c269432b3a">Slog::levelDebug</a>);} <a name="l00458"></a>00458 <a name="l00463"></a><a class="code" href="classost_1_1_app_log.html#a96dc36849c8d4b815c094b63ad8672ce">00463</a> <span class="keyword">inline</span> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> &<a class="code" href="namespaceost.html#a83dc8550b8ed793d67cdd61eb19c92ed" title="Manipulator for emerg level.">emerg</a>(<span class="keywordtype">void</span>) <a name="l00464"></a>00464 {<span class="keywordflow">return</span> operator()(<a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7aa1acd6522fbb9d8790867d5c51ea9b008">Slog::levelEmergency</a>);} <a name="l00465"></a>00465 <a name="l00470"></a><a class="code" href="classost_1_1_app_log.html#aa2bbf94e5e3437f32ffa2622a67dfef1">00470</a> <span class="keyword">inline</span> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> &<a class="code" href="namespaceost.html#a1f2a71206461b2144eaf6a3e7150e5dd" title="Manipulator for alert level.">alert</a>(<span class="keywordtype">void</span>) <a name="l00471"></a>00471 {<span class="keywordflow">return</span> operator()(<a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7aa4862c8c52a86210064d2d6360db6b18d">Slog::levelAlert</a>);} <a name="l00472"></a>00472 <a name="l00477"></a><a class="code" href="classost_1_1_app_log.html#a5b36002e1bcbd94380878e2b1dd8cf60">00477</a> <span class="keyword">inline</span> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> &<a class="code" href="namespaceost.html#a5e16a3488a940fdefd3b54e9f472668b" title="Manipulator for critical level.">critical</a>(<span class="keywordtype">void</span>) <a name="l00478"></a>00478 {<span class="keywordflow">return</span> operator()(<a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7aabe7a4f15d9ea484e01831a7dc3e71926">Slog::levelCritical</a>);} <a name="l00479"></a>00479 <a name="l00484"></a><a class="code" href="classost_1_1_app_log.html#ab9cc7122fa0d1f6b4e13abb99779f715">00484</a> <span class="keyword">inline</span> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> &<a class="code" href="namespaceost.html#a14670ea356ba2430da0221cd72532cdf" title="Manipulator for notice level.">notice</a>(<span class="keywordtype">void</span>) <a name="l00485"></a>00485 {<span class="keywordflow">return</span> operator()(<a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7aada39f730e92fdec6cad3616fa3567c95">Slog::levelNotice</a>);} <a name="l00486"></a>00486 <a name="l00491"></a><a class="code" href="classost_1_1_app_log.html#ac014c749d07e07765fb42a947acee104">00491</a> <span class="keyword">inline</span> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> &<a class="code" href="namespaceost.html#a622b45d2f58d84c1d8c364763a97c2da" title="Manipulator for info level.">info</a>(<span class="keywordtype">void</span>) <a name="l00492"></a>00492 {<span class="keywordflow">return</span> operator()(<a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7aa4a5387e1f48ef86841a807f6687d3d9c">Slog::levelInfo</a>);} <a name="l00493"></a>00493 <a name="l00509"></a><a class="code" href="classost_1_1_app_log.html#a3373feee3364f5055a254a5631f0ba06">00509</a> <span class="keyword">static</span> <a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7a">Slog::Level</a> levelTranslate(<span class="keywordtype">string</span> name) <a name="l00510"></a>00510 { <a name="l00511"></a>00511 map<string, Slog::Level>::iterator it = assoc->find(name); <a name="l00512"></a>00512 <a name="l00513"></a>00513 <span class="keywordflow">return</span> (it != assoc->end()) ? it->second : <a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7aa1acd6522fbb9d8790867d5c51ea9b008">Slog::levelEmergency</a>; <a name="l00514"></a>00514 } <a name="l00515"></a>00515 <a name="l00516"></a>00516 }; <a name="l00517"></a>00517 <a name="l00523"></a><a class="code" href="namespaceost.html#a60294b8e0dd5a8812580edd0446ac11a">00523</a> <a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <span class="keyword">inline</span> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> &<a class="code" href="namespaceost.html#a60294b8e0dd5a8812580edd0446ac11a" title="Manipulator for debug level.">debug</a>(<a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a>& sl) <a name="l00524"></a>00524 {<span class="keywordflow">return</span> sl.operator()(<a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7aa7d9ce368944e6852d05730c269432b3a">Slog::levelDebug</a>);} <a name="l00525"></a>00525 <a name="l00531"></a><a class="code" href="namespaceost.html#a24dc8ba691e7376d9c19762e2701fa63">00531</a> <a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <span class="keyword">inline</span> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> &<a class="code" href="namespaceost.html#a24dc8ba691e7376d9c19762e2701fa63" title="Manipulator for warn level.">warn</a>(<a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a>& sl) <a name="l00532"></a>00532 {<span class="keywordflow">return</span> sl.operator()(<a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7aa568c02bbd98a58f508a83334c65ffcea">Slog::levelWarning</a>);} <a name="l00533"></a>00533 <a name="l00539"></a><a class="code" href="namespaceost.html#a61faeec2dc6ec946dc3e98979bd93124">00539</a> <a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <span class="keyword">inline</span> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> &<a class="code" href="namespaceost.html#a61faeec2dc6ec946dc3e98979bd93124" title="Manipulator for error level.">error</a>(<a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a>& sl) <a name="l00540"></a>00540 { <span class="keywordflow">return</span> sl.operator()(<a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7aaf82cf7bb589d776186fbd0ab7b345f6e">Slog::levelError</a>);} <a name="l00541"></a>00541 <a name="l00547"></a><a class="code" href="namespaceost.html#a83dc8550b8ed793d67cdd61eb19c92ed">00547</a> <a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <span class="keyword">inline</span> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> &<a class="code" href="namespaceost.html#a83dc8550b8ed793d67cdd61eb19c92ed" title="Manipulator for emerg level.">emerg</a>(<a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a>& sl) <a name="l00548"></a>00548 {<span class="keywordflow">return</span> sl.operator()(<a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7aa1acd6522fbb9d8790867d5c51ea9b008">Slog::levelEmergency</a>);} <a name="l00549"></a>00549 <a name="l00555"></a><a class="code" href="namespaceost.html#a1f2a71206461b2144eaf6a3e7150e5dd">00555</a> <a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <span class="keyword">inline</span> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> &<a class="code" href="namespaceost.html#a1f2a71206461b2144eaf6a3e7150e5dd" title="Manipulator for alert level.">alert</a>(<a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a>& sl) <a name="l00556"></a>00556 {<span class="keywordflow">return</span> sl.operator()(<a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7aa4862c8c52a86210064d2d6360db6b18d">Slog::levelAlert</a>);} <a name="l00557"></a>00557 <a name="l00563"></a><a class="code" href="namespaceost.html#a5e16a3488a940fdefd3b54e9f472668b">00563</a> <a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <span class="keyword">inline</span> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> &<a class="code" href="namespaceost.html#a5e16a3488a940fdefd3b54e9f472668b" title="Manipulator for critical level.">critical</a>(<a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a>& sl) <a name="l00564"></a>00564 {<span class="keywordflow">return</span> sl.operator()(<a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7aabe7a4f15d9ea484e01831a7dc3e71926">Slog::levelCritical</a>);} <a name="l00565"></a>00565 <a name="l00571"></a><a class="code" href="namespaceost.html#a14670ea356ba2430da0221cd72532cdf">00571</a> <a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <span class="keyword">inline</span> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> &<a class="code" href="namespaceost.html#a14670ea356ba2430da0221cd72532cdf" title="Manipulator for notice level.">notice</a>(<a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a>& sl) <a name="l00572"></a>00572 {<span class="keywordflow">return</span> sl.operator()(<a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7aada39f730e92fdec6cad3616fa3567c95">Slog::levelNotice</a>);} <a name="l00573"></a>00573 <a name="l00579"></a><a class="code" href="namespaceost.html#a622b45d2f58d84c1d8c364763a97c2da">00579</a> <a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <span class="keyword">inline</span> <a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a> &<a class="code" href="namespaceost.html#a622b45d2f58d84c1d8c364763a97c2da" title="Manipulator for info level.">info</a>(<a class="code" href="classost_1_1_app_log.html" title="Application logger is a class that implements a logger that can be used by applications...">AppLog</a>& sl) <a name="l00580"></a>00580 {<span class="keywordflow">return</span> sl.operator()(<a class="code" href="classost_1_1_slog.html#a47ef36225607dba90b4be5012daccd7aa4a5387e1f48ef86841a807f6687d3d9c">Slog::levelInfo</a>);} <a name="l00581"></a>00581 <a name="l00585"></a>00585 <a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <span class="keyword">extern</span> AppLog <a class="code" href="namespaceost.html#ac345333eb0936b0bf9bef5e72cef1440" title="alog global log stream definition">alog</a>; <a name="l00586"></a>00586 <a name="l00587"></a>00587 <span class="preprocessor">#ifdef CCXX_NAMESPACES</span> <a name="l00588"></a>00588 <span class="preprocessor"></span>} <span class="comment">//namespace</span> <a name="l00589"></a>00589 <span class="preprocessor">#endif</span> <a name="l00590"></a>00590 <span class="preprocessor"></span> <a name="l00591"></a>00591 <span class="preprocessor">#endif //___APPLOG_H___</span> </pre></div></div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Nov 12 09:55:46 2010 for GNU CommonC++ by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> </body> </html>