• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>HRF: Human readable log format</title>
5<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../../index.html" title="Boost.Test">
8<link rel="up" href="../log_formats.html" title="Log formats">
9<link rel="prev" href="test_log_output.html" title="Test log output">
10<link rel="next" href="log_xml_format.html" title="XML log format">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="test_log_output.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../log_formats.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="log_xml_format.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h4 class="title">
27<a name="boost_test.test_output.log_formats.log_human_readable_format"></a><a class="link" href="log_human_readable_format.html" title="HRF: Human readable log format">HRF:
28        Human readable log format</a>
29</h4></div></div></div>
30<p>
31          The human readable log format is designed to closely match an errors description
32          produced by the Microsoft family of C++ compilers. This format allows jumping
33          to the error location, if test module output is redirected into IDE output
34          window. The rest of the log messages are designed to produce the most human
35          friendly description of the events occurring in test module. This is a
36          default format generated by test modules.
37        </p>
38<p>
39          Here the list of events along with corresponding message and the condition
40          that has to be satisfied for it to appear in the output.
41        </p>
42<div class="informaltable"><table class="table">
43<colgroup>
44<col>
45<col>
46<col>
47</colgroup>
48<thead><tr>
49<th>
50                  <p>
51                    Event
52                  </p>
53                </th>
54<th>
55                  <p>
56                    Condition
57                  </p>
58                </th>
59<th>
60                  <p>
61                    Output
62                  </p>
63                </th>
64</tr></thead>
65<tbody>
66<tr>
67<td>
68                  <p>
69                    On testing start
70                  </p>
71                </td>
72<td>
73                  <p>
74                    threshold != log_nothing
75                  </p>
76                </td>
77<td>
78                  <p>
79                    <code class="computeroutput"><span class="identifier">Running</span> <span class="special">&lt;</span><span class="identifier">total</span> <span class="identifier">number</span>
80                    <span class="identifier">of</span> <span class="identifier">test</span>
81                    <span class="identifier">cases</span><span class="special">&gt;</span>
82                    <span class="identifier">test</span> <span class="keyword">case</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span> <span class="special">...</span></code>
83                  </p>
84                </td>
85</tr>
86<tr>
87<td>
88                  <p>
89                    On testing start
90                  </p>
91                </td>
92<td>
93                  <p>
94                    threshold != log_nothing, show_build_info is set
95                  </p>
96                </td>
97<td>
98<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting">Platform: $BOOST_PLATFORM
99Compiler: $BOOST_COMPILER
100STL     : $BOOST_STDLIB
101Boost   : $BOOST_VERSION</pre>
102                </td>
103</tr>
104<tr>
105<td>
106                  <p>
107                    On abnormal testing termination
108                  </p>
109                </td>
110<td>
111                  <p>
112                    threshold &lt;= log_messages
113                  </p>
114                </td>
115<td>
116                  <p>
117                    <code class="computeroutput"><span class="identifier">Test</span> <span class="identifier">is</span>
118                    <span class="identifier">aborted</span></code>
119                  </p>
120                </td>
121</tr>
122<tr>
123<td>
124                  <p>
125                    On test unit start
126                  </p>
127                </td>
128<td>
129                  <p>
130                    threshold &lt;= log_test_units
131                  </p>
132                </td>
133<td>
134                  <p>
135                    <code class="computeroutput"><span class="identifier">Entering</span> <span class="identifier">test</span>
136                    <span class="special">&lt;</span><span class="identifier">test</span>
137                    <span class="identifier">unit</span> <span class="identifier">type</span><span class="special">&gt;</span> <span class="special">&lt;</span><span class="identifier">test</span> <span class="identifier">unit</span>
138                    <span class="identifier">name</span><span class="special">&gt;</span></code>
139                  </p>
140                </td>
141</tr>
142<tr>
143<td>
144                  <p>
145                    On test unit end
146                  </p>
147                </td>
148<td>
149                  <p>
150                    threshold &lt;= log_test_units; testing time is reported only
151                    if elapsed time is more than 1 us.
152                  </p>
153                </td>
154<td>
155                  <p>
156                    <code class="computeroutput"><span class="identifier">Leaving</span> <span class="identifier">test</span>
157                    <span class="special">&lt;</span><span class="identifier">test</span>
158                    <span class="identifier">unit</span> <span class="identifier">type</span><span class="special">&gt;</span> <span class="special">&lt;</span><span class="identifier">test</span> <span class="identifier">unit</span>
159                    <span class="identifier">name</span><span class="special">&gt;;</span>
160                    <span class="identifier">testing</span> <span class="identifier">time</span>
161                    <span class="special">&lt;</span><span class="identifier">value</span><span class="special">&gt;</span></code>
162                  </p>
163                </td>
164</tr>
165<tr>
166<td>
167                  <p>
168                    On skipped test unit
169                  </p>
170                </td>
171<td>
172                  <p>
173                    threshold &lt;= log_test_units
174                  </p>
175                </td>
176<td>
177                  <p>
178                    <code class="computeroutput"><span class="identifier">Test</span> <span class="special">&lt;</span><span class="identifier">test</span> <span class="identifier">unit</span>
179                    <span class="identifier">type</span><span class="special">&gt;</span>
180                    <span class="special">&lt;</span><span class="identifier">test</span>
181                    <span class="identifier">unit</span> <span class="identifier">name</span><span class="special">&gt;</span> <span class="identifier">is</span>
182                    <span class="identifier">skipped</span></code>
183                  </p>
184                </td>
185</tr>
186<tr>
187<td>
188                  <p>
189                    On uncaught C++ exception
190                  </p>
191                </td>
192<td>
193                  <p>
194                    threshold &lt;= log_cpp_exception_errors. Checkpoint message
195                    is reported only if provided
196                  </p>
197                </td>
198<td>
199                  <p>
200                    <code class="computeroutput"><span class="identifier">unknown</span> <span class="identifier">location</span><span class="special">(</span><span class="number">0</span><span class="special">):</span> <span class="identifier">fatal</span>
201                    <span class="identifier">error</span> <span class="identifier">in</span>
202                    <span class="special">&lt;</span><span class="identifier">test</span>
203                    <span class="keyword">case</span> <span class="identifier">name</span><span class="special">&gt;:</span> <span class="special">&lt;</span><span class="identifier">explanation</span><span class="special">&gt;</span>
204                    <span class="special">&lt;</span><span class="identifier">last</span>
205                    <span class="identifier">checkpoint</span> <span class="identifier">location</span><span class="special">&gt;:</span> <span class="identifier">last</span>
206                    <span class="identifier">checkpoint</span><span class="special">:</span>
207                    <span class="special">&lt;</span><span class="identifier">checkpoint</span>
208                    <span class="identifier">message</span><span class="special">&gt;</span></code>
209                  </p>
210                </td>
211</tr>
212<tr>
213<td>
214                  <p>
215                    On resumable system error
216                  </p>
217                </td>
218<td>
219                  <p>
220                    threshold &lt;= log_system_errors. Checkpoint message is reported
221                    only if provided
222                  </p>
223                </td>
224<td>
225                  <p>
226                    <code class="computeroutput"><span class="identifier">unknown</span> <span class="identifier">location</span><span class="special">(</span><span class="number">0</span><span class="special">):</span> <span class="identifier">fatal</span>
227                    <span class="identifier">error</span> <span class="identifier">in</span>
228                    <span class="special">&lt;</span><span class="identifier">test</span>
229                    <span class="keyword">case</span> <span class="identifier">name</span><span class="special">&gt;:</span> <span class="special">&lt;</span><span class="identifier">explanation</span><span class="special">&gt;</span>
230                    <span class="special">&lt;</span><span class="identifier">last</span>
231                    <span class="identifier">checkpoint</span> <span class="identifier">location</span><span class="special">&gt;:</span> <span class="identifier">last</span>
232                    <span class="identifier">checkpoint</span><span class="special">:</span>
233                    <span class="special">&lt;</span><span class="identifier">checkpoint</span>
234                    <span class="identifier">message</span><span class="special">&gt;</span></code>
235                  </p>
236                </td>
237</tr>
238<tr>
239<td>
240                  <p>
241                    On fatal system error
242                  </p>
243                </td>
244<td>
245                  <p>
246                    threshold &lt;= log_fatal_errors. Checkpoint message is reported
247                    only if provided
248                  </p>
249                </td>
250<td>
251                  <p>
252                    <code class="computeroutput"><span class="identifier">unknown</span> <span class="identifier">location</span><span class="special">(</span><span class="number">0</span><span class="special">):</span> <span class="identifier">fatal</span>
253                    <span class="identifier">error</span> <span class="identifier">in</span>
254                    <span class="special">&lt;</span><span class="identifier">test</span>
255                    <span class="keyword">case</span> <span class="identifier">name</span><span class="special">&gt;:</span> <span class="special">&lt;</span><span class="identifier">explanation</span><span class="special">&gt;</span>
256                    <span class="special">&lt;</span><span class="identifier">last</span>
257                    <span class="identifier">checkpoint</span> <span class="identifier">location</span><span class="special">&gt;:</span> <span class="identifier">last</span>
258                    <span class="identifier">checkpoint</span><span class="special">:</span>
259                    <span class="special">&lt;</span><span class="identifier">checkpoint</span>
260                    <span class="identifier">message</span><span class="special">&gt;</span></code>
261                  </p>
262                </td>
263</tr>
264<tr>
265<td>
266                  <p>
267                    On passed test assertion
268                  </p>
269                </td>
270<td>
271                  <p>
272                    threshold &lt;= log_successful_tests
273                  </p>
274                </td>
275<td>
276                  <p>
277                    <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">assertion</span>
278                    <span class="identifier">location</span><span class="special">&gt;:</span>
279                    <span class="identifier">info</span><span class="special">:</span>
280                    <span class="identifier">check</span><span class="special">&lt;</span><span class="identifier">assertion</span> <span class="identifier">expression</span><span class="special">&gt;</span> <span class="identifier">passed</span></code>
281                  </p>
282                </td>
283</tr>
284<tr>
285<td>
286                  <p>
287                    On failed WARNING level test assertion
288                  </p>
289                </td>
290<td>
291                  <p>
292                    threshold &lt;= log_warnings
293                  </p>
294                </td>
295<td>
296                  <p>
297                    <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">assertion</span>
298                    <span class="identifier">location</span><span class="special">&gt;:</span>
299                    <span class="identifier">warning</span> <span class="identifier">in</span>
300                    <span class="special">&lt;</span><span class="identifier">test</span>
301                    <span class="keyword">case</span> <span class="identifier">name</span><span class="special">&gt;:</span> <span class="identifier">condition</span>
302                    <span class="special">&lt;</span><span class="identifier">assertion</span>
303                    <span class="identifier">description</span><span class="special">&gt;</span>
304                    <span class="identifier">is</span> <span class="keyword">not</span>
305                    <span class="identifier">satisfied</span></code>
306                  </p>
307                </td>
308</tr>
309<tr>
310<td>
311                  <p>
312                    On failed CHECK level test assertion
313                  </p>
314                </td>
315<td>
316                  <p>
317                    threshold &lt;= log_all_errors
318                  </p>
319                </td>
320<td>
321                  <p>
322                    <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">assertion</span>
323                    <span class="identifier">location</span><span class="special">&gt;:</span>
324                    <span class="identifier">error</span> <span class="identifier">in</span>
325                    <span class="special">&lt;</span><span class="identifier">test</span>
326                    <span class="keyword">case</span> <span class="identifier">name</span><span class="special">&gt;:</span> <span class="identifier">check</span>
327                    <span class="special">&lt;</span><span class="identifier">assertion</span>
328                    <span class="identifier">description</span><span class="special">&gt;</span>
329                    <span class="identifier">failed</span></code>
330                  </p>
331                </td>
332</tr>
333<tr>
334<td>
335                  <p>
336                    On failed REQUIRE level test assertion
337                  </p>
338                </td>
339<td>
340                  <p>
341                    threshold &lt;= log_fatal_errors
342                  </p>
343                </td>
344<td>
345                  <p>
346                    <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">assertion</span>
347                    <span class="identifier">location</span><span class="special">&gt;:</span>
348                    <span class="identifier">fatal</span> <span class="identifier">error</span>
349                    <span class="identifier">in</span> <span class="special">&lt;</span><span class="identifier">test</span> <span class="keyword">case</span>
350                    <span class="identifier">name</span><span class="special">&gt;:</span>
351                    <span class="identifier">critical</span> <span class="identifier">check</span>
352                    <span class="special">&lt;</span><span class="identifier">assertion</span>
353                    <span class="identifier">description</span><span class="special">&gt;</span>
354                    <span class="identifier">failed</span></code>
355                  </p>
356                </td>
357</tr>
358<tr>
359<td>
360                  <p>
361                    On test log message
362                  </p>
363                </td>
364<td>
365                  <p>
366                    threshold &lt;= log_messages
367                  </p>
368                </td>
369<td>
370                  <p>
371                    <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">Message</span>
372                    <span class="identifier">content</span><span class="special">&gt;</span></code>
373                  </p>
374                </td>
375</tr>
376</tbody>
377</table></div>
378<p>
379          The level of details concerning the error message depends on the <a class="link" href="../../testing_tools.html" title="Writing unit tests">testing tool</a> producing the log
380          entry.
381        </p>
382</div>
383<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
384<td align="left"></td>
385<td align="right"><div class="copyright-footer">Copyright © 2001-2020 Boost.Test contributors<p>
386        Distributed under the Boost Software License, Version 1.0. (See accompanying
387        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
388      </p>
389</div></td>
390</tr></table>
391<hr>
392<div class="spirit-nav">
393<a accesskey="p" href="test_log_output.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../log_formats.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="log_xml_format.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
394</div>
395</body>
396</html>
397