1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>log_sink</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_level.html" title="log_level"> 10<link rel="next" href="logger.html" title="logger"> 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_level.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="logger.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_sink"></a><a class="link" href="log_sink.html" title="log_sink"><code class="computeroutput"><span class="identifier">log_sink</span></code></a> 28</h4></div></div></div> 29<p> 30 Parameter <span class="emphasis"><em>log_sink</em></span> allows to set the log sink - location 31 where framework writes the testing log to, thus it allows to easily redirect 32 the testing log to file or standard streams. By default testing log is 33 directed to the standard output stream. 34 </p> 35<h5> 36<a name="boost_test.utf_reference.rt_param_reference.log_sink.h0"></a> 37 <span class="phrase"><a name="boost_test.utf_reference.rt_param_reference.log_sink.acceptable_values"></a></span><a class="link" href="log_sink.html#boost_test.utf_reference.rt_param_reference.log_sink.acceptable_values">Acceptable 38 values</a> 39 </h5> 40<p> 41 Case sensitive <a class="link" href="../rt_param_reference.html#regular_param_value">string</a>: 42 </p> 43<div class="informaltable"><table class="table"> 44<colgroup> 45<col> 46<col> 47</colgroup> 48<thead><tr> 49<th> 50 <p> 51 Value 52 </p> 53 </th> 54<th> 55 <p> 56 Meaning 57 </p> 58 </th> 59</tr></thead> 60<tbody> 61<tr> 62<td> 63 <p> 64 <span class="bold"><strong><code class="computeroutput"><span class="identifier">stdout</span></code></strong></span> 65 (default for HRF and XML) 66 </p> 67 </td> 68<td> 69 <p> 70 Testing log is redirected into standard output stream 71 </p> 72 </td> 73</tr> 74<tr> 75<td> 76 <p> 77 stderr 78 </p> 79 </td> 80<td> 81 <p> 82 Testing log is redirected into standard error stream 83 </p> 84 </td> 85</tr> 86<tr> 87<td> 88 <p> 89 File name (default for JUNIT) 90 </p> 91 </td> 92<td> 93 <p> 94 Testing log is redirected into this file 95 </p> 96 </td> 97</tr> 98</tbody> 99</table></div> 100<div class="note"><table border="0" summary="Note"> 101<tr> 102<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td> 103<th align="left">Note</th> 104</tr> 105<tr><td align="left" valign="top"><p> 106 For JUnit and if not specified, the log file is generated after the name 107 of the <a class="link" href="../../tests_organization/test_tree/master_test_suite.html" title="Master test suite">master 108 test suite</a>. 109 </p></td></tr> 110</table></div> 111<h5> 112<a name="boost_test.utf_reference.rt_param_reference.log_sink.h1"></a> 113 <span class="phrase"><a name="boost_test.utf_reference.rt_param_reference.log_sink.command_line_syntax"></a></span><a class="link" href="log_sink.html#boost_test.utf_reference.rt_param_reference.log_sink.command_line_syntax">Command 114 line syntax</a> 115 </h5> 116<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 117<li class="listitem"> 118 <code class="computeroutput"><span class="special">--</span><span class="identifier">log_sink</span><span class="special">=<</span><span class="identifier">stream</span> 119 <span class="keyword">or</span> <span class="identifier">file</span> 120 <span class="identifier">name</span><span class="special">></span></code> 121 </li> 122<li class="listitem"> 123 <code class="computeroutput"><span class="special">-</span><span class="identifier">k</span> 124 <span class="special"><</span><span class="identifier">stream</span> 125 <span class="keyword">or</span> <span class="identifier">file</span> 126 <span class="identifier">name</span><span class="special">></span></code> 127 </li> 128</ul></div> 129<h5> 130<a name="boost_test.utf_reference.rt_param_reference.log_sink.h2"></a> 131 <span class="phrase"><a name="boost_test.utf_reference.rt_param_reference.log_sink.environment_variable"></a></span><a class="link" href="log_sink.html#boost_test.utf_reference.rt_param_reference.log_sink.environment_variable">Environment 132 variable</a> 133 </h5> 134<pre class="programlisting"><span class="identifier">BOOST_TEST_LOG_SINK</span> 135</pre> 136</div> 137<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 138<td align="left"></td> 139<td align="right"><div class="copyright-footer">Copyright © 2001-2020 Boost.Test contributors<p> 140 Distributed under the Boost Software License, Version 1.0. (See accompanying 141 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>) 142 </p> 143</div></td> 144</tr></table> 145<hr> 146<div class="spirit-nav"> 147<a accesskey="p" href="log_level.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="logger.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> 148</div> 149</body> 150</html> 151