• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>log_level</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="../rt_param_reference.html" title="Runtime parameters reference">
9<link rel="prev" href="log_format.html" title="log_format">
10<link rel="next" href="log_sink.html" title="log_sink">
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="log_format.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../rt_param_reference.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_sink.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.utf_reference.rt_param_reference.log_level"></a><a class="link" href="log_level.html" title="log_level"><code class="computeroutput"><span class="identifier">log_level</span></code></a>
28</h4></div></div></div>
29<p>
30          Parameter <span class="emphasis"><em>log_level</em></span> allows to set the <span class="emphasis"><em>Unit
31          Test Framework</em></span> <a class="link" href="../../test_output/logging_api/log_ct_log_level.html#ref_log_level_explanations">log
32          level</a>. Log level defines the verbosity of the testing log produced
33          by a testing module. The verbosity ranges from a complete log, when all
34          assertions (both successful and failing) are reported and all notifications
35          about test units start and finish are included, to an empty log, when nothing
36          is reported to a testing log stream.
37        </p>
38<p>
39          Log level is set to one of the predefined levels which are organized hierarchically,
40          where each level includes all the messages on that level as well as all
41          the messages from levels below. Levels are identified by string names,
42          which are listed next.
43        </p>
44<h5>
45<a name="boost_test.utf_reference.rt_param_reference.log_level.h0"></a>
46          <span class="phrase"><a name="boost_test.utf_reference.rt_param_reference.log_level.acceptable_values"></a></span><a class="link" href="log_level.html#boost_test.utf_reference.rt_param_reference.log_level.acceptable_values">Acceptable
47          values</a>
48        </h5>
49<p>
50          Following is the list of <a class="link" href="../rt_param_reference.html#enum_param_value">enumeration</a>
51          log_level names ordered from higher to lower level. Thus each level includes
52          messages on that level as well as all the messages on levels defined below.
53        </p>
54<div class="informaltable"><table class="table">
55<colgroup>
56<col>
57<col>
58</colgroup>
59<thead><tr>
60<th>
61                  <p>
62                    Value
63                  </p>
64                </th>
65<th>
66                  <p>
67                    Included messages
68                  </p>
69                </th>
70</tr></thead>
71<tbody>
72<tr>
73<td>
74                  <p>
75                    all (default for JUNIT)
76                  </p>
77                </td>
78<td>
79                  <p>
80                    All log messages including the passed assertions notification
81                  </p>
82                </td>
83</tr>
84<tr>
85<td>
86                  <p>
87                    success
88                  </p>
89                </td>
90<td>
91                  <p>
92                    The same as all
93                  </p>
94                </td>
95</tr>
96<tr>
97<td>
98                  <p>
99                    test_suite
100                  </p>
101                </td>
102<td>
103                  <p>
104                    Test units start/finish notifications
105                  </p>
106                </td>
107</tr>
108<tr>
109<td>
110                  <p>
111                    message
112                  </p>
113                </td>
114<td>
115                  <p>
116                    User generated messages (using <a class="link" href="../testout_reference/test_output_macro_message.html" title="BOOST_TEST_MESSAGE"><code class="computeroutput"><span class="identifier">BOOST_TEST_MESSAGE</span></code></a> tool)
117                  </p>
118                </td>
119</tr>
120<tr>
121<td>
122                  <p>
123                    warning
124                  </p>
125                </td>
126<td>
127                  <p>
128                    Messages describing failed assertion on <code class="computeroutput"><span class="identifier">WARN</span></code>
129                    level ( <a class="link" href="../testing_tool_ref/assertion_boost_test_universal_macro.html" title="BOOST_TEST"><code class="computeroutput"><span class="identifier">BOOST_TEST_WARN</span></code></a> / <code class="computeroutput"><span class="identifier">BOOST_WARN_</span><span class="special">...</span></code>
130                    tools)
131                  </p>
132                </td>
133</tr>
134<tr>
135<td>
136                  <p>
137                    <span class="bold"><strong>error</strong></span> (default for HRF and XML)
138                  </p>
139                </td>
140<td>
141                  <p>
142                    Messages describing failed assertion on <code class="computeroutput"><span class="identifier">CHECK</span></code>
143                    level (<a class="link" href="../testing_tool_ref/assertion_boost_test_universal_macro.html" title="BOOST_TEST"><code class="computeroutput"><span class="identifier">BOOST_TEST</span></code></a> / <code class="computeroutput"><span class="identifier">BOOST_CHECK_</span><span class="special">...</span></code>
144                    tools)
145                  </p>
146                </td>
147</tr>
148<tr>
149<td>
150                  <p>
151                    cpp_exception
152                  </p>
153                </td>
154<td>
155                  <p>
156                    Messages reporting uncaught C++ exception
157                  </p>
158                </td>
159</tr>
160<tr>
161<td>
162                  <p>
163                    system_error
164                  </p>
165                </td>
166<td>
167                  <p>
168                    Messages reporting system originated non-fatal errors. For example,
169                    timeout or floating point exception.
170                  </p>
171                </td>
172</tr>
173<tr>
174<td>
175                  <p>
176                    fatal_error
177                  </p>
178                </td>
179<td>
180                  <p>
181                    Messages reporting user or system originated fatal errors. For
182                    example, memory access violation. Also all the messages describing
183                    failed assertion on <code class="computeroutput"><span class="identifier">REQUIRE</span></code>
184                    level (<a class="link" href="../testing_tool_ref/assertion_boost_test_universal_macro.html" title="BOOST_TEST"><code class="computeroutput"><span class="identifier">BOOST_TEST_REQUIRE</span></code></a> /
185                    <code class="computeroutput"><span class="identifier">BOOST_REQUIRE_</span><span class="special">...</span></code> tools)
186                  </p>
187                </td>
188</tr>
189<tr>
190<td>
191                  <p>
192                    nothing
193                  </p>
194                </td>
195<td>
196                  <p>
197                    No messages are reported.
198                  </p>
199                </td>
200</tr>
201</tbody>
202</table></div>
203<div class="caution"><table border="0" summary="Caution">
204<tr>
205<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../../../../../doc/src/images/caution.png"></td>
206<th align="left">Caution</th>
207</tr>
208<tr><td align="left" valign="top"><p>
209            the JUNIT log format does not accept the log level to change: anything
210            specified by <code class="computeroutput"><span class="identifier">log_level</span></code>
211            will be ignored for the JUNIT format.
212          </p></td></tr>
213</table></div>
214<h5>
215<a name="boost_test.utf_reference.rt_param_reference.log_level.h1"></a>
216          <span class="phrase"><a name="boost_test.utf_reference.rt_param_reference.log_level.command_line_syntax"></a></span><a class="link" href="log_level.html#boost_test.utf_reference.rt_param_reference.log_level.command_line_syntax">Command
217          line syntax</a>
218        </h5>
219<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
220<li class="listitem">
221              <code class="computeroutput"><span class="special">--</span><span class="identifier">log_level</span><span class="special">=&lt;</span><span class="identifier">level</span><span class="special">&gt;</span></code>
222            </li>
223<li class="listitem">
224              <code class="computeroutput"><span class="special">-</span><span class="identifier">l</span>
225              <span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span></code>
226            </li>
227</ul></div>
228<h5>
229<a name="boost_test.utf_reference.rt_param_reference.log_level.h2"></a>
230          <span class="phrase"><a name="boost_test.utf_reference.rt_param_reference.log_level.environment_variable"></a></span><a class="link" href="log_level.html#boost_test.utf_reference.rt_param_reference.log_level.environment_variable">Environment
231          variable</a>
232        </h5>
233<pre class="programlisting"><span class="identifier">BOOST_TEST_LOG_LEVEL</span>
234</pre>
235</div>
236<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
237<td align="left"></td>
238<td align="right"><div class="copyright-footer">Copyright © 2001-2020 Boost.Test contributors<p>
239        Distributed under the Boost Software License, Version 1.0. (See accompanying
240        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>)
241      </p>
242</div></td>
243</tr></table>
244<hr>
245<div class="spirit-nav">
246<a accesskey="p" href="log_format.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../rt_param_reference.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_sink.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
247</div>
248</body>
249</html>
250