• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Class xml_log_formatter</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="../../../header/boost/test/output/xml_log_formatter_hpp.html" title="Header &lt;boost/test/output/xml_log_formatter.hpp&gt;">
9<link rel="prev" href="../../../header/boost/test/output/xml_log_formatter_hpp.html" title="Header &lt;boost/test/output/xml_log_formatter.hpp&gt;">
10<link rel="next" href="../../../header/boost/test/output/xml_report_formatter_hpp.html" title="Header &lt;boost/test/output/xml_report_formatter.hpp&gt;">
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="../../../header/boost/test/output/xml_log_formatter_hpp.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../header/boost/test/output/xml_log_formatter_hpp.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="../../../header/boost/test/output/xml_report_formatter_hpp.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="refentry">
26<a name="boost.unit_test.output.xml_log_formatter"></a><div class="titlepage"></div>
27<div class="refnamediv">
28<h2><span class="refentrytitle">Class xml_log_formatter</span></h2>
29<p>boost::unit_test::output::xml_log_formatter</p>
30</div>
31<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
32<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../../header/boost/test/output/xml_log_formatter_hpp.html" title="Header &lt;boost/test/output/xml_log_formatter.hpp&gt;">boost/test/output/xml_log_formatter.hpp</a>&gt;
33
34</span>
35<span class="keyword">class</span> <a class="link" href="xml_log_formatter.html" title="Class xml_log_formatter">xml_log_formatter</a> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unit_test</span><span class="special">::</span><span class="identifier">unit_test_log_formatter</span> <span class="special">{</span>
36<span class="keyword">public</span><span class="special">:</span>
37
38  <span class="comment">// <a class="link" href="xml_log_formatter.html#idm45267287424000-bb">public member functions</a></span>
39  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="xml_log_formatter.html#idm45267287423440-bb"><span class="identifier">log_start</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">counter_t</span><span class="special">)</span><span class="special">;</span>
40  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="xml_log_formatter.html#idm45267287418048-bb"><span class="identifier">log_finish</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
41  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="xml_log_formatter.html#idm45267287413776-bb"><span class="identifier">log_build_info</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">)</span><span class="special">;</span>
42  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="xml_log_formatter.html#idm45267287409648-bb"><span class="identifier">test_unit_start</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="../test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
43  <span class="keyword">virtual</span> <span class="keyword">void</span>
44  <a class="link" href="xml_log_formatter.html#idm45267287403952-bb"><span class="identifier">test_unit_finish</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="../test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">long</span><span class="special">)</span><span class="special">;</span>
45  <span class="keyword">virtual</span> <span class="keyword">void</span>
46  <a class="link" href="xml_log_formatter.html#idm45267287397152-bb"><span class="identifier">test_unit_skipped</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="../test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">const_string</span><span class="special">)</span><span class="special">;</span>
47  <span class="keyword">virtual</span> <span class="keyword">void</span>
48  <a class="link" href="xml_log_formatter.html#idm45267287392096-bb"><span class="identifier">log_exception_start</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="../log_checkpoint_data.html" title="Struct log_checkpoint_data">log_checkpoint_data</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">,</span>
49                      <a class="link" href="../../execution_exception.html" title="Class execution_exception">execution_exception</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
50  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="xml_log_formatter.html#idm45267287380240-bb"><span class="identifier">log_exception_finish</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
51  <span class="keyword">virtual</span> <span class="keyword">void</span>
52  <a class="link" href="xml_log_formatter.html#idm45267287375904-bb"><span class="identifier">log_entry_start</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="../log_entry_data.html" title="Struct log_entry_data">log_entry_data</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">log_entry_types</span><span class="special">)</span><span class="special">;</span>
53  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="xml_log_formatter.html#idm45267287367888-bb"><span class="identifier">log_entry_value</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">const_string</span><span class="special">)</span><span class="special">;</span>
54  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="xml_log_formatter.html#idm45267287362368-bb"><span class="identifier">log_entry_finish</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
55  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="xml_log_formatter.html#idm45267287358064-bb"><span class="identifier">entry_context_start</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">log_level</span><span class="special">)</span><span class="special">;</span>
56  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="xml_log_formatter.html#idm45267287352352-bb"><span class="identifier">log_entry_context</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">log_level</span><span class="special">,</span> <span class="identifier">const_string</span><span class="special">)</span><span class="special">;</span>
57  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="xml_log_formatter.html#idm45267287345712-bb"><span class="identifier">entry_context_finish</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">log_level</span><span class="special">)</span><span class="special">;</span>
58  <span class="keyword">void</span> <a class="link" href="xml_log_formatter.html#idm45267287340272-bb"><span class="identifier">log_entry_value</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
59  <span class="keyword">void</span> <a class="link" href="xml_log_formatter.html#idm45267287337264-bb"><span class="identifier">log_entry_value</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
60  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="xml_log_formatter.html#idm45267287334064-bb"><span class="identifier">test_unit_skipped</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="../test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
61  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="xml_log_formatter.html#idm45267287329888-bb"><span class="identifier">test_unit_aborted</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="../test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
62  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="xml_log_formatter.html#idm45267287326800-bb"><span class="identifier">test_unit_timed_out</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="../test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
63  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="xml_log_formatter.html#idm45267287323712-bb"><span class="identifier">log_entry_value</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">lazy_ostream</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
64  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="xml_log_formatter.html#idm45267287318016-bb"><span class="identifier">set_log_level</span></a><span class="special">(</span><span class="identifier">log_level</span><span class="special">)</span><span class="special">;</span>
65  <span class="keyword">virtual</span> <span class="identifier">log_level</span> <a class="link" href="xml_log_formatter.html#idm45267287314512-bb"><span class="identifier">get_log_level</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
66  <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <a class="link" href="xml_log_formatter.html#idm45267287311680-bb"><span class="identifier">get_default_stream_description</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
67<span class="special">}</span><span class="special">;</span></pre></div>
68<div class="refsect1">
69<a name="idm46175618036064"></a><h2>Description</h2>
70<div class="refsect2">
71<a name="idm46175618035648"></a><h3>
72<a name="idm45267287424000-bb"></a><code class="computeroutput">xml_log_formatter</code> public member functions</h3>
73<div class="orderedlist"><ol class="orderedlist" type="1">
74<li class="listitem">
75<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287423440-bb"></a><span class="identifier">log_start</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> os<span class="special">,</span> <span class="identifier">counter_t</span> test_cases_amount<span class="special">)</span><span class="special">;</span></pre>Invoked at the beginning of test module execution. <p>
76</p>
77<p><span class="bold"><strong>See Also:</strong></span></p>
78<p>log_finish </p>
79<p>
80</p>
81<p>
82</p>
83<div class="variablelist"><table border="0" class="variablelist compact">
84<colgroup>
85<col align="left" valign="top">
86<col>
87</colgroup>
88<tbody><tr>
89<td><p><span class="term">Parameters:</span></p></td>
90<td><div class="variablelist"><table border="0" class="variablelist compact">
91<colgroup>
92<col align="left" valign="top">
93<col>
94</colgroup>
95<tbody>
96<tr>
97<td><p><span class="term"><code class="computeroutput">os</code></span></p></td>
98<td><p>output stream to write a messages to </p></td>
99</tr>
100<tr>
101<td><p><span class="term"><code class="computeroutput">test_cases_amount</code></span></p></td>
102<td><p>total test case amount to be run </p></td>
103</tr>
104</tbody>
105</table></div></td>
106</tr></tbody>
107</table></div>
108</li>
109<li class="listitem">
110<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287418048-bb"></a><span class="identifier">log_finish</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> os<span class="special">)</span><span class="special">;</span></pre>Invoked at the end of test module execution. <p>
111</p>
112<p><span class="bold"><strong>See Also:</strong></span></p>
113<p>log_start </p>
114<p>
115</p>
116<p>
117</p>
118<div class="variablelist"><table border="0" class="variablelist compact">
119<colgroup>
120<col align="left" valign="top">
121<col>
122</colgroup>
123<tbody><tr>
124<td><p><span class="term">Parameters:</span></p></td>
125<td><div class="variablelist"><table border="0" class="variablelist compact">
126<colgroup>
127<col align="left" valign="top">
128<col>
129</colgroup>
130<tbody><tr>
131<td><p><span class="term"><code class="computeroutput">os</code></span></p></td>
132<td><p>output stream to write a messages into </p></td>
133</tr></tbody>
134</table></div></td>
135</tr></tbody>
136</table></div>
137</li>
138<li class="listitem">
139<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287413776-bb"></a><span class="identifier">log_build_info</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> os<span class="special">,</span> <span class="keyword">bool</span> log_build_info<span class="special">)</span><span class="special">;</span></pre>Invoked when Unit Test Framework build information is requested. <p>
140</p>
141<div class="variablelist"><table border="0" class="variablelist compact">
142<colgroup>
143<col align="left" valign="top">
144<col>
145</colgroup>
146<tbody><tr>
147<td><p><span class="term">Parameters:</span></p></td>
148<td><div class="variablelist"><table border="0" class="variablelist compact">
149<colgroup>
150<col align="left" valign="top">
151<col>
152</colgroup>
153<tbody>
154<tr>
155<td><p><span class="term"><code class="computeroutput">log_build_info</code></span></p></td>
156<td><p>indicates if build info should be logged or not </p></td>
157</tr>
158<tr>
159<td><p><span class="term"><code class="computeroutput">os</code></span></p></td>
160<td><p>output stream to write a messages into </p></td>
161</tr>
162</tbody>
163</table></div></td>
164</tr></tbody>
165</table></div>
166</li>
167<li class="listitem">
168<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287409648-bb"></a><span class="identifier">test_unit_start</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> os<span class="special">,</span> <a class="link" href="../test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span> tu<span class="special">)</span><span class="special">;</span></pre>Invoked when test unit starts (either test suite or test case) <p>
169</p>
170<p><span class="bold"><strong>See Also:</strong></span></p>
171<p>test_unit_finish </p>
172<p>
173</p>
174<p>
175</p>
176<div class="variablelist"><table border="0" class="variablelist compact">
177<colgroup>
178<col align="left" valign="top">
179<col>
180</colgroup>
181<tbody><tr>
182<td><p><span class="term">Parameters:</span></p></td>
183<td><div class="variablelist"><table border="0" class="variablelist compact">
184<colgroup>
185<col align="left" valign="top">
186<col>
187</colgroup>
188<tbody>
189<tr>
190<td><p><span class="term"><code class="computeroutput">os</code></span></p></td>
191<td><p>output stream to write a messages into </p></td>
192</tr>
193<tr>
194<td><p><span class="term"><code class="computeroutput">tu</code></span></p></td>
195<td><p>test unit being started </p></td>
196</tr>
197</tbody>
198</table></div></td>
199</tr></tbody>
200</table></div>
201</li>
202<li class="listitem">
203<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span>
204<a name="idm45267287403952-bb"></a><span class="identifier">test_unit_finish</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> os<span class="special">,</span> <a class="link" href="../test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span> tu<span class="special">,</span>
205                 <span class="keyword">unsigned</span> <span class="keyword">long</span> elapsed<span class="special">)</span><span class="special">;</span></pre>Invoked when test unit finishes. <p>
206</p>
207<p><span class="bold"><strong>See Also:</strong></span></p>
208<p>test_unit_start </p>
209<p>
210</p>
211<p>
212</p>
213<div class="variablelist"><table border="0" class="variablelist compact">
214<colgroup>
215<col align="left" valign="top">
216<col>
217</colgroup>
218<tbody><tr>
219<td><p><span class="term">Parameters:</span></p></td>
220<td><div class="variablelist"><table border="0" class="variablelist compact">
221<colgroup>
222<col align="left" valign="top">
223<col>
224</colgroup>
225<tbody>
226<tr>
227<td><p><span class="term"><code class="computeroutput">elapsed</code></span></p></td>
228<td><p>time in microseconds spend executing this test unit </p></td>
229</tr>
230<tr>
231<td><p><span class="term"><code class="computeroutput">os</code></span></p></td>
232<td><p>output stream to write a messages into </p></td>
233</tr>
234<tr>
235<td><p><span class="term"><code class="computeroutput">tu</code></span></p></td>
236<td><p>test unit being finished </p></td>
237</tr>
238</tbody>
239</table></div></td>
240</tr></tbody>
241</table></div>
242</li>
243<li class="listitem">
244<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span>
245<a name="idm45267287397152-bb"></a><span class="identifier">test_unit_skipped</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> os<span class="special">,</span> <a class="link" href="../test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span> tu<span class="special">,</span> <span class="identifier">const_string</span><span class="special">)</span><span class="special">;</span></pre>Invoked if test unit skipped for any reason. <p>
246</p>
247<div class="variablelist"><table border="0" class="variablelist compact">
248<colgroup>
249<col align="left" valign="top">
250<col>
251</colgroup>
252<tbody><tr>
253<td><p><span class="term">Parameters:</span></p></td>
254<td><div class="variablelist"><table border="0" class="variablelist compact">
255<colgroup>
256<col align="left" valign="top">
257<col>
258</colgroup>
259<tbody>
260<tr>
261<td><p><span class="term"><code class="computeroutput">os</code></span></p></td>
262<td><p>output stream to write a messages into </p></td>
263</tr>
264<tr>
265<td><p><span class="term"><code class="computeroutput">tu</code></span></p></td>
266<td><p>skipped test unit </p></td>
267</tr>
268</tbody>
269</table></div></td>
270</tr></tbody>
271</table></div>
272</li>
273<li class="listitem">
274<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span>
275<a name="idm45267287392096-bb"></a><span class="identifier">log_exception_start</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> os<span class="special">,</span> <a class="link" href="../log_checkpoint_data.html" title="Struct log_checkpoint_data">log_checkpoint_data</a> <span class="keyword">const</span> <span class="special">&amp;</span> lcd<span class="special">,</span>
276                    <a class="link" href="../../execution_exception.html" title="Class execution_exception">execution_exception</a> <span class="keyword">const</span> <span class="special">&amp;</span> ex<span class="special">)</span><span class="special">;</span></pre>Invoked when Unit Test Framework detects uncaught exception. <p>The framwork calls this function when an uncaught exception it detected. This call is followed by context information:</p>
277<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
278<li class="listitem"><p>one call to <code class="computeroutput">entry_context_start</code>,</p></li>
279<li class="listitem"><p>as many calls to <code class="computeroutput">log_entry_context</code> as there are context entries</p></li>
280<li class="listitem"><p>one call to <code class="computeroutput">entry_context_finish</code> </p></li>
281</ul></div>
282<p>
283</p>
284<p>The logging of the exception information is finilized by a call to <code class="computeroutput">log_exception_finish</code>.</p>
285<p>
286</p>
287<p><span class="bold"><strong>See Also:</strong></span></p>
288<p>log_exception_finish </p>
289<p>
290</p>
291<p>
292</p>
293<div class="variablelist"><table border="0" class="variablelist compact">
294<colgroup>
295<col align="left" valign="top">
296<col>
297</colgroup>
298<tbody><tr>
299<td><p><span class="term">Parameters:</span></p></td>
300<td><div class="variablelist"><table border="0" class="variablelist compact">
301<colgroup>
302<col align="left" valign="top">
303<col>
304</colgroup>
305<tbody>
306<tr>
307<td><p><span class="term"><code class="computeroutput">ex</code></span></p></td>
308<td><p>information about the caught exception </p></td>
309</tr>
310<tr>
311<td><p><span class="term"><code class="computeroutput">lcd</code></span></p></td>
312<td><p>information about the last checkpoint before the exception was triggered </p></td>
313</tr>
314<tr>
315<td><p><span class="term"><code class="computeroutput">os</code></span></p></td>
316<td><p>output stream to write a messages into </p></td>
317</tr>
318</tbody>
319</table></div></td>
320</tr></tbody>
321</table></div>
322</li>
323<li class="listitem">
324<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287380240-bb"></a><span class="identifier">log_exception_finish</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> os<span class="special">)</span><span class="special">;</span></pre>Invoked when Unit Test Framework detects uncaught exception. <p>Call to this function finishes uncaught exception report.
325</p>
326<p><span class="bold"><strong>See Also:</strong></span></p>
327<p>log_exception_start </p>
328<p>
329</p>
330<p>
331</p>
332<div class="variablelist"><table border="0" class="variablelist compact">
333<colgroup>
334<col align="left" valign="top">
335<col>
336</colgroup>
337<tbody><tr>
338<td><p><span class="term">Parameters:</span></p></td>
339<td><div class="variablelist"><table border="0" class="variablelist compact">
340<colgroup>
341<col align="left" valign="top">
342<col>
343</colgroup>
344<tbody><tr>
345<td><p><span class="term"><code class="computeroutput">os</code></span></p></td>
346<td><p>output stream to write a messages into </p></td>
347</tr></tbody>
348</table></div></td>
349</tr></tbody>
350</table></div>
351</li>
352<li class="listitem">
353<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span>
354<a name="idm45267287375904-bb"></a><span class="identifier">log_entry_start</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> os<span class="special">,</span> <a class="link" href="../log_entry_data.html" title="Struct log_entry_data">log_entry_data</a> <span class="keyword">const</span> <span class="special">&amp;</span> led<span class="special">,</span>
355                <span class="identifier">log_entry_types</span> let<span class="special">)</span><span class="special">;</span></pre>Invoked by Unit Test Framework to start new log entry. <p>Call to this function starts new log entry. It is followed by series of log_entry_value calls and finally call to log_entry_finish. A log entry may consist of one or more values being reported. Some of these values will be plain strings, while others can be complicated expressions in a form of "lazy" expression template lazy_ostream.
356</p>
357<p><span class="bold"><strong>See Also:</strong></span></p>
358<p>log_entry_value, log_entry_finish</p>
359<p>
360</p>
361<p>
362</p>
363<div class="note"><table border="0" summary="Note">
364<tr>
365<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td>
366<th align="left">Note</th>
367</tr>
368<tr><td align="left" valign="top"><p>call to this function may happen before any call to test_unit_start or all calls to test_unit_finish as the framework might log errors raised during global initialization/shutdown. </p></td></tr>
369</table></div>
370<p>
371</p>
372<div class="variablelist"><table border="0" class="variablelist compact">
373<colgroup>
374<col align="left" valign="top">
375<col>
376</colgroup>
377<tbody><tr>
378<td><p><span class="term">Parameters:</span></p></td>
379<td><div class="variablelist"><table border="0" class="variablelist compact">
380<colgroup>
381<col align="left" valign="top">
382<col>
383</colgroup>
384<tbody>
385<tr>
386<td><p><span class="term"><code class="computeroutput">led</code></span></p></td>
387<td><p>log entry attributes </p></td>
388</tr>
389<tr>
390<td><p><span class="term"><code class="computeroutput">let</code></span></p></td>
391<td><p>log entry type log_entry_finish </p></td>
392</tr>
393<tr>
394<td><p><span class="term"><code class="computeroutput">os</code></span></p></td>
395<td><p>output stream to write a messages into </p></td>
396</tr>
397</tbody>
398</table></div></td>
399</tr></tbody>
400</table></div>
401</li>
402<li class="listitem">
403<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287367888-bb"></a><span class="identifier">log_entry_value</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> os<span class="special">,</span> <span class="identifier">const_string</span> value<span class="special">)</span><span class="special">;</span></pre>Invoked by Unit Test Framework to report a log entry content. <p>This is one of two overloaded methods to report log entry content. This one is used to report plain string value.
404</p>
405<p><span class="bold"><strong>See Also:</strong></span></p>
406<p>log_entry_start, log_entry_finish </p>
407<p>
408</p>
409<p>
410</p>
411<div class="variablelist"><table border="0" class="variablelist compact">
412<colgroup>
413<col align="left" valign="top">
414<col>
415</colgroup>
416<tbody><tr>
417<td><p><span class="term">Parameters:</span></p></td>
418<td><div class="variablelist"><table border="0" class="variablelist compact">
419<colgroup>
420<col align="left" valign="top">
421<col>
422</colgroup>
423<tbody>
424<tr>
425<td><p><span class="term"><code class="computeroutput">os</code></span></p></td>
426<td><p>output stream to write a messages into. </p></td>
427</tr>
428<tr>
429<td><p><span class="term"><code class="computeroutput">value</code></span></p></td>
430<td><p>log entry string value </p></td>
431</tr>
432</tbody>
433</table></div></td>
434</tr></tbody>
435</table></div>
436</li>
437<li class="listitem">
438<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287362368-bb"></a><span class="identifier">log_entry_finish</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> os<span class="special">)</span><span class="special">;</span></pre>Invoked by Unit Test Framework to finish a log entry report. <p>
439</p>
440<p><span class="bold"><strong>See Also:</strong></span></p>
441<p>log_entry_start, log_entry_start </p>
442<p>
443</p>
444<p>
445</p>
446<div class="variablelist"><table border="0" class="variablelist compact">
447<colgroup>
448<col align="left" valign="top">
449<col>
450</colgroup>
451<tbody><tr>
452<td><p><span class="term">Parameters:</span></p></td>
453<td><div class="variablelist"><table border="0" class="variablelist compact">
454<colgroup>
455<col align="left" valign="top">
456<col>
457</colgroup>
458<tbody><tr>
459<td><p><span class="term"><code class="computeroutput">os</code></span></p></td>
460<td><p>output stream to write a messages into </p></td>
461</tr></tbody>
462</table></div></td>
463</tr></tbody>
464</table></div>
465</li>
466<li class="listitem">
467<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287358064-bb"></a><span class="identifier">entry_context_start</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> os<span class="special">,</span> <span class="identifier">log_level</span> l<span class="special">)</span><span class="special">;</span></pre>Invoked by Unit Test Framework to start log entry context report. <p>Unit Test Framework logs for failed assertions and uncaught exceptions context if one was defined by a test module. Context consists of multiple "scopes" identified by description messages assigned by the test module using BOOST_TEST_INFO/BOOST_TEST_CONTEXT statements.
468</p>
469<p><span class="bold"><strong>See Also:</strong></span></p>
470<p>log_entry_context, entry_context_finish </p>
471<p>
472</p>
473<p>
474</p>
475<div class="variablelist"><table border="0" class="variablelist compact">
476<colgroup>
477<col align="left" valign="top">
478<col>
479</colgroup>
480<tbody><tr>
481<td><p><span class="term">Parameters:</span></p></td>
482<td><div class="variablelist"><table border="0" class="variablelist compact">
483<colgroup>
484<col align="left" valign="top">
485<col>
486</colgroup>
487<tbody>
488<tr>
489<td><p><span class="term"><code class="computeroutput">l</code></span></p></td>
490<td><p>entry log_level, to be used to fine tune the message </p></td>
491</tr>
492<tr>
493<td><p><span class="term"><code class="computeroutput">os</code></span></p></td>
494<td><p>output stream to write a messages into </p></td>
495</tr>
496</tbody>
497</table></div></td>
498</tr></tbody>
499</table></div>
500</li>
501<li class="listitem">
502<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span>
503<a name="idm45267287352352-bb"></a><span class="identifier">log_entry_context</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> os<span class="special">,</span> <span class="identifier">log_level</span> l<span class="special">,</span> <span class="identifier">const_string</span> value<span class="special">)</span><span class="special">;</span></pre>Invoked by Unit Test Framework to report log entry context "scope" description. <p>Each "scope" description is reported by separate call to log_entry_context.
504</p>
505<p><span class="bold"><strong>See Also:</strong></span></p>
506<p>log_entry_start, entry_context_finish </p>
507<p>
508</p>
509<p>
510</p>
511<div class="variablelist"><table border="0" class="variablelist compact">
512<colgroup>
513<col align="left" valign="top">
514<col>
515</colgroup>
516<tbody><tr>
517<td><p><span class="term">Parameters:</span></p></td>
518<td><div class="variablelist"><table border="0" class="variablelist compact">
519<colgroup>
520<col align="left" valign="top">
521<col>
522</colgroup>
523<tbody>
524<tr>
525<td><p><span class="term"><code class="computeroutput">l</code></span></p></td>
526<td><p>entry log_level, to be used to fine tune the message </p></td>
527</tr>
528<tr>
529<td><p><span class="term"><code class="computeroutput">os</code></span></p></td>
530<td><p>output stream to write a messages into </p></td>
531</tr>
532<tr>
533<td><p><span class="term"><code class="computeroutput">value</code></span></p></td>
534<td><p>context "scope" description </p></td>
535</tr>
536</tbody>
537</table></div></td>
538</tr></tbody>
539</table></div>
540</li>
541<li class="listitem">
542<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287345712-bb"></a><span class="identifier">entry_context_finish</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> os<span class="special">,</span> <span class="identifier">log_level</span> l<span class="special">)</span><span class="special">;</span></pre>Invoked by Unit Test Framework to finish log entry context report. <p>
543</p>
544<p><span class="bold"><strong>See Also:</strong></span></p>
545<p>log_entry_start, entry_context_context </p>
546<p>
547</p>
548<p>
549</p>
550<div class="variablelist"><table border="0" class="variablelist compact">
551<colgroup>
552<col align="left" valign="top">
553<col>
554</colgroup>
555<tbody><tr>
556<td><p><span class="term">Parameters:</span></p></td>
557<td><div class="variablelist"><table border="0" class="variablelist compact">
558<colgroup>
559<col align="left" valign="top">
560<col>
561</colgroup>
562<tbody>
563<tr>
564<td><p><span class="term"><code class="computeroutput">l</code></span></p></td>
565<td><p>entry log_level, to be used to fine tune the message </p></td>
566</tr>
567<tr>
568<td><p><span class="term"><code class="computeroutput">os</code></span></p></td>
569<td><p>output stream to write a messages into </p></td>
570</tr>
571</tbody>
572</table></div></td>
573</tr></tbody>
574</table></div>
575</li>
576<li class="listitem">
577<pre class="literallayout"><span class="keyword">void</span> <a name="idm45267287340272-bb"></a><span class="identifier">log_entry_value</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Invoked by Unit Test Framework to report a log entry content. <p>This is one of two overloaded methods to report log entry content. This one is used to report plain string value.
578</p>
579<p><span class="bold"><strong>See Also:</strong></span></p>
580<p>log_entry_start, log_entry_finish </p>
581<p>
582</p>
583<p>
584</p>
585</li>
586<li class="listitem">
587<pre class="literallayout"><span class="keyword">void</span> <a name="idm45267287337264-bb"></a><span class="identifier">log_entry_value</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Invoked by Unit Test Framework to report a log entry content. <p>This is one of two overloaded methods to report log entry content. This one is used to report some complicated expression passed as an expression template lazy_ostream. In most cases default implementation provided by the framework should work as is (it just converts the lazy expression into a string.
588</p>
589<p><span class="bold"><strong>See Also:</strong></span></p>
590<p>log_entry_start, log_entry_finish </p>
591<p>
592</p>
593<p>
594</p>
595</li>
596<li class="listitem">
597<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287334064-bb"></a><span class="identifier">test_unit_skipped</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="../test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>Deprecated version of this interface. <p><span style="color: red">&lt;xrefsect&gt;<span style="color: red">&lt;xreftitle&gt;Deprecated&lt;/xreftitle&gt;</span><span style="color: red">&lt;xrefdescription&gt;&lt;/xrefdescription&gt;</span>&lt;/xrefsect&gt;</span></p>
598</li>
599<li class="listitem">
600<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287329888-bb"></a><span class="identifier">test_unit_aborted</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="../test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>Invoked when a test unit is aborted. </li>
601<li class="listitem">
602<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287326800-bb"></a><span class="identifier">test_unit_timed_out</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="../test_unit.html" title="Class test_unit">test_unit</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>Invoked when a test unit times-out. </li>
603<li class="listitem">
604<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287323712-bb"></a><span class="identifier">log_entry_value</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> os<span class="special">,</span> <span class="identifier">lazy_ostream</span> <span class="keyword">const</span> <span class="special">&amp;</span> value<span class="special">)</span><span class="special">;</span></pre>Invoked by Unit Test Framework to report a log entry content. <p>This is one of two overloaded methods to report log entry content. This one is used to report some complicated expression passed as an expression template lazy_ostream. In most cases default implementation provided by the framework should work as is (it just converts the lazy expression into a string.
605</p>
606<p><span class="bold"><strong>See Also:</strong></span></p>
607<p>log_entry_start, log_entry_finish </p>
608<p>
609</p>
610<p>
611</p>
612<div class="variablelist"><table border="0" class="variablelist compact">
613<colgroup>
614<col align="left" valign="top">
615<col>
616</colgroup>
617<tbody><tr>
618<td><p><span class="term">Parameters:</span></p></td>
619<td><div class="variablelist"><table border="0" class="variablelist compact">
620<colgroup>
621<col align="left" valign="top">
622<col>
623</colgroup>
624<tbody>
625<tr>
626<td><p><span class="term"><code class="computeroutput">os</code></span></p></td>
627<td><p>output stream to write a messages into </p></td>
628</tr>
629<tr>
630<td><p><span class="term"><code class="computeroutput">value</code></span></p></td>
631<td><p>log entry "lazy" value </p></td>
632</tr>
633</tbody>
634</table></div></td>
635</tr></tbody>
636</table></div>
637</li>
638<li class="listitem">
639<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45267287318016-bb"></a><span class="identifier">set_log_level</span><span class="special">(</span><span class="identifier">log_level</span> new_log_level<span class="special">)</span><span class="special">;</span></pre>Sets the log level of the logger/formatter. <p>Some loggers need to manage the log level by their own. This member function let the implementation decide of that. </p>
640<p><b>Since Boost 1.62 . </b></p>
641<p>
642</p>
643</li>
644<li class="listitem">
645<pre class="literallayout"><span class="keyword">virtual</span> <span class="identifier">log_level</span> <a name="idm45267287314512-bb"></a><span class="identifier">get_log_level</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Returns the log level of the logger/formatter. <p><b>Since Boost 1.62 . </b></p>
646<p>
647</p>
648</li>
649<li class="listitem">
650<pre class="literallayout"><span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <a name="idm45267287311680-bb"></a><span class="identifier">get_default_stream_description</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Returns a default stream for this logger. <p>The returned string describes the stream as if it was passed from the command line <code class="computeroutput">"--log_sink"</code> parameter. With that regards, <span class="bold"><strong>stdout</strong></span> and <span class="bold"><strong>stderr</strong></span> have special meaning indicating the standard output or error stream respectively.</p>
651<p><b>Since Boost 1.62 . </b></p>
652<p>
653</p>
654</li>
655</ol></div>
656</div>
657</div>
658</div>
659<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
660<td align="left"></td>
661<td align="right"><div class="copyright-footer">Copyright © 2001-2020 Boost.Test contributors<p>
662        Distributed under the Boost Software License, Version 1.0. (See accompanying
663        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>)
664      </p>
665</div></td>
666</tr></table>
667<hr>
668<div class="spirit-nav">
669<a accesskey="p" href="../../../header/boost/test/output/xml_log_formatter_hpp.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../header/boost/test/output/xml_log_formatter_hpp.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="../../../header/boost/test/output/xml_report_formatter_hpp.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
670</div>
671</body>
672</html>
673