1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
<title>Qt Cryptographic Architecture: QCA::Logger Class Reference</title>
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
<link href="tabs.css" rel="stylesheet" type="text/css">
7
<!-- Generated by Doxygen 1.4.6 -->
10
<li><a href="index.html"><span>Main Page</span></a></li>
11
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
12
<li id="current"><a href="annotated.html"><span>Classes</span></a></li>
13
<li><a href="files.html"><span>Files</span></a></li>
14
<li><a href="dirs.html"><span>Directories</span></a></li>
15
<li><a href="pages.html"><span>Related Pages</span></a></li>
16
<li><a href="examples.html"><span>Examples</span></a></li>
20
<li><a href="annotated.html"><span>Class List</span></a></li>
21
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
22
<li><a href="functions.html"><span>Class Members</span></a></li>
25
<a class="el" href="namespaceQCA.html">QCA</a>::<a class="el" href="classQCA_1_1Logger.html">Logger</a></div>
26
<h1>QCA::Logger Class Reference</h1><!-- doxytag: class="QCA::Logger" --><!-- doxytag: inherits="QObject" -->A simple logging system.
27
<a href="#_details">More...</a>
29
<code>#include <<a class="el" href="qca__support_8h-source.html">qca_support.h</a>></code>
31
<p>Inheritance diagram for QCA::Logger:
32
<p><center><img src="classQCA_1_1Logger.png" usemap="#QCA::Logger_map" border="0" alt=""></center>
33
<map name="QCA::Logger_map">
34
<area doxygen="qt.tag:" href="qobject.html" alt="QObject" shape="rect" coords="0,0,86,24">
36
Collaboration diagram for QCA::Logger:<p><center><img src="classQCA_1_1Logger__coll__graph.png" border="0" usemap="#QCA_1_1Logger__coll__map" alt="Collaboration graph"></center>
37
<map name="QCA_1_1Logger__coll__map">
38
<area doxygen="qt.tag:" href="qobject.html" shape="rect" coords="8,9,77,33" alt="">
39
<area doxygen="qt.tag:" href="qlist.html" shape="rect" coords="101,9,298,33" alt="">
40
<area doxygen="qt.tag:" href="qstringlist.html" shape="rect" coords="416,9,504,33" alt="">
42
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classQCA_1_1Logger-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
44
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
45
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed99">Severity</a> { <br>
46
<a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed9945168d0d0b8fa50e9c209b5b8f2489e9">Quiet</a> = 0,
47
<a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed99b947aa5c534a0c5a2a01e4227cb0db87">Emergency</a> = 1,
48
<a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed99c571c043837f4c1ff7254c5ac818ddb3">Alert</a> = 2,
49
<a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed99e7c798e8fe745ca3c9828d2a6268f12f">Critical</a> = 3,
51
<a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed992c647707c4e1b8bb624184e942e156ec">Error</a> = 4,
52
<a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed99b1ca14ca2dba7a95100e3cc81e10ff6f">Warning</a> = 5,
53
<a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed99387f387c48afb0d955d5a2b0c2505443">Notice</a> = 6,
54
<a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed993bb2ed657f81d2a875958bbca15a650f">Information</a> = 7,
56
<a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed99269fcde16988e4c6339283630cc81259">Debug</a> = 8
60
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
61
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed99">Logger::Severity</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Logger.html#6fbe681023f9e03607a6ce4aa587ec79">level</a> () const </td></tr>
63
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Logger.html#8ac9f365d373edb5d3aa742232b4d3ee">setLevel</a> (<a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed99">Logger::Severity</a> level)</td></tr>
65
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Logger.html#f5cd318aa6480abc79c027ef56101e66">logTextMessage</a> (const <a class="elRef" doxygen="qt.tag:" href="qstring.html">QString</a> &message, <a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed99">Severity</a>=Information)</td></tr>
67
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Logger.html#a65b0a31c259f1640b0b2b7e1e1cf98e">logBinaryMessage</a> (const <a class="elRef" doxygen="qt.tag:" href="qbytearray.html">QByteArray</a> &blob, <a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed99">Severity</a>=Information)</td></tr>
69
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Logger.html#a0d710826ad7811a588e7d4bedf63249">registerLogDevice</a> (<a class="el" href="classQCA_1_1AbstractLogDevice.html">AbstractLogDevice</a> *logger)</td></tr>
71
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Logger.html#e31ce1e8fe5c5482040b32802813abb4">unregisterLogDevice</a> (const <a class="elRef" doxygen="qt.tag:" href="qstring.html">QString</a> &loggerName)</td></tr>
73
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="qt.tag:" href="qstringlist.html">QStringList</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Logger.html#75b13a98491057fac3c58c4b35bc0c04">currentLogDevices</a> () const </td></tr>
75
<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
76
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9929f1efd289a1b5299a120669201943"></a><!-- doxytag: member="QCA::Logger::Global" ref="9929f1efd289a1b5299a120669201943" args="" -->
77
class </td><td class="memItemRight" valign="bottom"><b>Global</b></td></tr>
80
<hr><a name="_details"></a><h2>Detailed Description</h2>
81
A simple logging system.
83
This class provides a simple but flexible approach to logging information that may be used for debugging or system operation diagnostics.<p>
84
There is a single Logger for each application that uses QCA. You do not need to create this Logger yourself - QCA automatically creates it on startup. You can get access to the Logger using the global <a class="el" href="namespaceQCA.html#f2b31de5e15fb42e32ed00205de330e9">QCA::logger()</a> method.<p>
85
By default the <a class="el" href="classQCA_1_1Logger.html">Logger</a> just accepts all messages (binary and text). If you want to get access to those messages, you need to subclass <a class="el" href="classQCA_1_1AbstractLogDevice.html">AbstractLogDevice</a>, and register your subclass (using <a class="el" href="classQCA_1_1Logger.html#a0d710826ad7811a588e7d4bedf63249">registerLogDevice()</a>). You can then take whatever action is appropriate (e.g. show to the user using the GUI, log to a file or send to standard error).
87
<hr><h2>Member Enumeration Documentation</h2>
88
<a class="anchor" name="a3123f11cb1dc7a9cc032c09d4c2ed99"></a><!-- doxytag: member="QCA::Logger::Severity" ref="a3123f11cb1dc7a9cc032c09d4c2ed99" args="" --><p>
89
<table class="mdTable" cellpadding="2" cellspacing="0">
92
<table cellpadding="0" cellspacing="0" border="0">
94
<td class="md" nowrap valign="top">enum <a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed99">QCA::Logger::Severity</a> </td>
100
<table cellspacing="5" cellpadding="0" border="0">
108
The severity of the message.
110
This information may be used by the log device to determine what the appropriate action is. <dl compact><dt><b>Enumerator: </b></dt><dd>
111
<table border="0" cellspacing="2" cellpadding="0">
112
<tr><td valign="top"><em><a class="anchor" name="a3123f11cb1dc7a9cc032c09d4c2ed9945168d0d0b8fa50e9c209b5b8f2489e9"></a><!-- doxytag: member="Quiet" ref="a3123f11cb1dc7a9cc032c09d4c2ed9945168d0d0b8fa50e9c209b5b8f2489e9" args="" -->Quiet</em> </td><td>
113
Quiet: turn of logging. </td></tr>
114
<tr><td valign="top"><em><a class="anchor" name="a3123f11cb1dc7a9cc032c09d4c2ed99b947aa5c534a0c5a2a01e4227cb0db87"></a><!-- doxytag: member="Emergency" ref="a3123f11cb1dc7a9cc032c09d4c2ed99b947aa5c534a0c5a2a01e4227cb0db87" args="" -->Emergency</em> </td><td>
115
Emergency: system is unusable. </td></tr>
116
<tr><td valign="top"><em><a class="anchor" name="a3123f11cb1dc7a9cc032c09d4c2ed99c571c043837f4c1ff7254c5ac818ddb3"></a><!-- doxytag: member="Alert" ref="a3123f11cb1dc7a9cc032c09d4c2ed99c571c043837f4c1ff7254c5ac818ddb3" args="" -->Alert</em> </td><td>
117
Alert: action must be taken immediately. </td></tr>
118
<tr><td valign="top"><em><a class="anchor" name="a3123f11cb1dc7a9cc032c09d4c2ed99e7c798e8fe745ca3c9828d2a6268f12f"></a><!-- doxytag: member="Critical" ref="a3123f11cb1dc7a9cc032c09d4c2ed99e7c798e8fe745ca3c9828d2a6268f12f" args="" -->Critical</em> </td><td>
119
Critical: critical conditions. </td></tr>
120
<tr><td valign="top"><em><a class="anchor" name="a3123f11cb1dc7a9cc032c09d4c2ed992c647707c4e1b8bb624184e942e156ec"></a><!-- doxytag: member="Error" ref="a3123f11cb1dc7a9cc032c09d4c2ed992c647707c4e1b8bb624184e942e156ec" args="" -->Error</em> </td><td>
121
Error: error conditions. </td></tr>
122
<tr><td valign="top"><em><a class="anchor" name="a3123f11cb1dc7a9cc032c09d4c2ed99b1ca14ca2dba7a95100e3cc81e10ff6f"></a><!-- doxytag: member="Warning" ref="a3123f11cb1dc7a9cc032c09d4c2ed99b1ca14ca2dba7a95100e3cc81e10ff6f" args="" -->Warning</em> </td><td>
123
Warning: warning conditions. </td></tr>
124
<tr><td valign="top"><em><a class="anchor" name="a3123f11cb1dc7a9cc032c09d4c2ed99387f387c48afb0d955d5a2b0c2505443"></a><!-- doxytag: member="Notice" ref="a3123f11cb1dc7a9cc032c09d4c2ed99387f387c48afb0d955d5a2b0c2505443" args="" -->Notice</em> </td><td>
125
Notice: normal but significant condition. </td></tr>
126
<tr><td valign="top"><em><a class="anchor" name="a3123f11cb1dc7a9cc032c09d4c2ed993bb2ed657f81d2a875958bbca15a650f"></a><!-- doxytag: member="Information" ref="a3123f11cb1dc7a9cc032c09d4c2ed993bb2ed657f81d2a875958bbca15a650f" args="" -->Information</em> </td><td>
127
Informational: informational messages. </td></tr>
128
<tr><td valign="top"><em><a class="anchor" name="a3123f11cb1dc7a9cc032c09d4c2ed99269fcde16988e4c6339283630cc81259"></a><!-- doxytag: member="Debug" ref="a3123f11cb1dc7a9cc032c09d4c2ed99269fcde16988e4c6339283630cc81259" args="" -->Debug</em> </td><td>
129
Debug: debug-level messages. </td></tr>
135
<hr><h2>Member Function Documentation</h2>
136
<a class="anchor" name="6fbe681023f9e03607a6ce4aa587ec79"></a><!-- doxytag: member="QCA::Logger::level" ref="6fbe681023f9e03607a6ce4aa587ec79" args="() const " --><p>
137
<table class="mdTable" cellpadding="2" cellspacing="0">
140
<table cellpadding="0" cellspacing="0" border="0">
142
<td class="md" nowrap valign="top"><a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed99">Logger::Severity</a> QCA::Logger::level </td>
143
<td class="md" valign="top">( </td>
144
<td class="mdname1" valign="top" nowrap> </td>
145
<td class="md" valign="top"> ) </td>
146
<td class="md" nowrap> const<code> [inline]</code></td>
152
<table cellspacing="5" cellpadding="0" border="0">
160
Get the current logging level.
162
<dl compact><dt><b>Returns:</b></dt><dd>Current level </dd></dl>
166
<a class="anchor" name="8ac9f365d373edb5d3aa742232b4d3ee"></a><!-- doxytag: member="QCA::Logger::setLevel" ref="8ac9f365d373edb5d3aa742232b4d3ee" args="(Logger::Severity level)" --><p>
167
<table class="mdTable" cellpadding="2" cellspacing="0">
170
<table cellpadding="0" cellspacing="0" border="0">
172
<td class="md" nowrap valign="top">void QCA::Logger::setLevel </td>
173
<td class="md" valign="top">( </td>
174
<td class="md" nowrap valign="top"><a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed99">Logger::Severity</a> </td>
175
<td class="mdname1" valign="top" nowrap> <em>level</em> </td>
176
<td class="md" valign="top"> ) </td>
177
<td class="md" nowrap></td>
183
<table cellspacing="5" cellpadding="0" border="0">
191
Set the current logging level.
193
<dl compact><dt><b>Parameters:</b></dt><dd>
194
<table border="0" cellspacing="2" cellpadding="0">
195
<tr><td valign="top"></td><td valign="top"><em>level</em> </td><td>new logging level</td></tr>
198
Only severities less or equal than the log level one will be logged </td>
201
<a class="anchor" name="f5cd318aa6480abc79c027ef56101e66"></a><!-- doxytag: member="QCA::Logger::logTextMessage" ref="f5cd318aa6480abc79c027ef56101e66" args="(const QString &message, Severity=Information)" --><p>
202
<table class="mdTable" cellpadding="2" cellspacing="0">
205
<table cellpadding="0" cellspacing="0" border="0">
207
<td class="md" nowrap valign="top">void QCA::Logger::logTextMessage </td>
208
<td class="md" valign="top">( </td>
209
<td class="md" nowrap valign="top">const <a class="elRef" doxygen="qt.tag:" href="qstring.html">QString</a> & </td>
210
<td class="mdname" nowrap> <em>message</em>, </td>
213
<td class="md" nowrap align="right"></td>
215
<td class="md" nowrap><a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed99">Severity</a> </td>
216
<td class="mdname" nowrap> = <code>Information</code></td>
220
<td class="md">) </td>
221
<td class="md" colspan="2"></td>
227
<table cellspacing="5" cellpadding="0" border="0">
235
Log a message to all available log devices.
237
<dl compact><dt><b>Parameters:</b></dt><dd>
238
<table border="0" cellspacing="2" cellpadding="0">
239
<tr><td valign="top"></td><td valign="top"><em>message</em> </td><td>the text to log </td></tr>
245
<a class="anchor" name="a65b0a31c259f1640b0b2b7e1e1cf98e"></a><!-- doxytag: member="QCA::Logger::logBinaryMessage" ref="a65b0a31c259f1640b0b2b7e1e1cf98e" args="(const QByteArray &blob, Severity=Information)" --><p>
246
<table class="mdTable" cellpadding="2" cellspacing="0">
249
<table cellpadding="0" cellspacing="0" border="0">
251
<td class="md" nowrap valign="top">void QCA::Logger::logBinaryMessage </td>
252
<td class="md" valign="top">( </td>
253
<td class="md" nowrap valign="top">const <a class="elRef" doxygen="qt.tag:" href="qbytearray.html">QByteArray</a> & </td>
254
<td class="mdname" nowrap> <em>blob</em>, </td>
257
<td class="md" nowrap align="right"></td>
259
<td class="md" nowrap><a class="el" href="classQCA_1_1Logger.html#a3123f11cb1dc7a9cc032c09d4c2ed99">Severity</a> </td>
260
<td class="mdname" nowrap> = <code>Information</code></td>
264
<td class="md">) </td>
265
<td class="md" colspan="2"></td>
271
<table cellspacing="5" cellpadding="0" border="0">
279
Log a binary blob to all available log devices.
281
<dl compact><dt><b>Parameters:</b></dt><dd>
282
<table border="0" cellspacing="2" cellpadding="0">
283
<tr><td valign="top"></td><td valign="top"><em>blob</em> </td><td>the information to log</td></tr>
286
<dl compact><dt><b>Note:</b></dt><dd>how this is handled is quite logger specific. For example, it might be logged as a binary, or it might be encoded in some way </dd></dl>
290
<a class="anchor" name="a0d710826ad7811a588e7d4bedf63249"></a><!-- doxytag: member="QCA::Logger::registerLogDevice" ref="a0d710826ad7811a588e7d4bedf63249" args="(AbstractLogDevice *logger)" --><p>
291
<table class="mdTable" cellpadding="2" cellspacing="0">
294
<table cellpadding="0" cellspacing="0" border="0">
296
<td class="md" nowrap valign="top">void QCA::Logger::registerLogDevice </td>
297
<td class="md" valign="top">( </td>
298
<td class="md" nowrap valign="top"><a class="el" href="classQCA_1_1AbstractLogDevice.html">AbstractLogDevice</a> * </td>
299
<td class="mdname1" valign="top" nowrap> <em>logger</em> </td>
300
<td class="md" valign="top"> ) </td>
301
<td class="md" nowrap></td>
307
<table cellspacing="5" cellpadding="0" border="0">
315
Add an <a class="el" href="classQCA_1_1AbstractLogDevice.html">AbstractLogDevice</a> subclass to the existing list of loggers.
317
<dl compact><dt><b>Parameters:</b></dt><dd>
318
<table border="0" cellspacing="2" cellpadding="0">
319
<tr><td valign="top"></td><td valign="top"><em>logger</em> </td><td>the LogDevice to add </td></tr>
325
<a class="anchor" name="e31ce1e8fe5c5482040b32802813abb4"></a><!-- doxytag: member="QCA::Logger::unregisterLogDevice" ref="e31ce1e8fe5c5482040b32802813abb4" args="(const QString &loggerName)" --><p>
326
<table class="mdTable" cellpadding="2" cellspacing="0">
329
<table cellpadding="0" cellspacing="0" border="0">
331
<td class="md" nowrap valign="top">void QCA::Logger::unregisterLogDevice </td>
332
<td class="md" valign="top">( </td>
333
<td class="md" nowrap valign="top">const <a class="elRef" doxygen="qt.tag:" href="qstring.html">QString</a> & </td>
334
<td class="mdname1" valign="top" nowrap> <em>loggerName</em> </td>
335
<td class="md" valign="top"> ) </td>
336
<td class="md" nowrap></td>
342
<table cellspacing="5" cellpadding="0" border="0">
350
Remove an <a class="el" href="classQCA_1_1AbstractLogDevice.html">AbstractLogDevice</a> subclass from the existing list of loggers.
352
<dl compact><dt><b>Parameters:</b></dt><dd>
353
<table border="0" cellspacing="2" cellpadding="0">
354
<tr><td valign="top"></td><td valign="top"><em>loggerName</em> </td><td>the name of the LogDevice to remove</td></tr>
357
<dl compact><dt><b>Note:</b></dt><dd>If there are several log devices with the same name, all will be removed. </dd></dl>
361
<a class="anchor" name="75b13a98491057fac3c58c4b35bc0c04"></a><!-- doxytag: member="QCA::Logger::currentLogDevices" ref="75b13a98491057fac3c58c4b35bc0c04" args="() const " --><p>
362
<table class="mdTable" cellpadding="2" cellspacing="0">
365
<table cellpadding="0" cellspacing="0" border="0">
367
<td class="md" nowrap valign="top"><a class="elRef" doxygen="qt.tag:" href="qstringlist.html">QStringList</a> QCA::Logger::currentLogDevices </td>
368
<td class="md" valign="top">( </td>
369
<td class="mdname1" valign="top" nowrap> </td>
370
<td class="md" valign="top"> ) </td>
371
<td class="md" nowrap> const</td>
377
<table cellspacing="5" cellpadding="0" border="0">
385
Get a list of the names of all registered log devices.
390
<hr>The documentation for this class was generated from the following file:<ul>
391
<li><a class="el" href="qca__support_8h-source.html">qca_support.h</a></ul>
392
<hr size="1"><address style="align: right;"><small>Generated on Fri Jul 6 13:24:26 2007 for Qt Cryptographic Architecture by
393
<a href="http://www.doxygen.org/index.html">
394
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>