Imported Upstream version 1.71.0
[platform/upstream/boost.git] / libs / log / doc / html / boost / log / add_cons_idm45185961514512.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Function template add_console_log</title>
5 <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Log v2">
8 <link rel="up" href="../../utilities.html#header.boost.log.utility.setup.console_hpp" title="Header &lt;boost/log/utility/setup/console.hpp&gt;">
9 <link rel="prev" href="add_common_attributes.html" title="Function add_common_attributes">
10 <link rel="next" href="add_cons_idm45185961500960.html" title="Function template add_console_log">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
14 <hr>
15 <div class="spirit-nav">
16 <a accesskey="p" href="add_common_attributes.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../utilities.html#header.boost.log.utility.setup.console_hpp"><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="add_cons_idm45185961500960.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
17 </div>
18 <div class="refentry">
19 <a name="boost.log.add_cons_idm45185961514512"></a><div class="titlepage"></div>
20 <div class="refnamediv">
21 <h2><span class="refentrytitle">Function template add_console_log</span></h2>
22 <p>boost::log::add_console_log</p>
23 </div>
24 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
25 <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="../../utilities.html#header.boost.log.utility.setup.console_hpp" title="Header &lt;boost/log/utility/setup/console.hpp&gt;">boost/log/utility/setup/console.hpp</a>&gt;
26
27 </span>
28 <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span><span class="special">...</span> ArgsT<span class="special">&gt;</span> 
29   <span class="identifier">shared_ptr</span><span class="special">&lt;</span> <span class="identifier">sinks</span><span class="special">::</span><span class="identifier">synchronous_sink</span><span class="special">&lt;</span> <span class="identifier">sinks</span><span class="special">::</span><span class="identifier">basic_text_ostream_backend</span><span class="special">&lt;</span> <span class="identifier">CharT</span> <span class="special">&gt;</span> <span class="special">&gt;&gt;</span> 
30   <span class="identifier">add_console_log</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">CharT</span> <span class="special">&gt;</span> <span class="special">&amp;</span> strm<span class="special">,</span> <span class="identifier">ArgsT</span><span class="special">...</span> <span class="keyword">const</span> <span class="special">&amp;</span> args<span class="special">)</span><span class="special">;</span></pre></div>
31 <div class="refsect1">
32 <a name="idm46436891415600"></a><h2>Description</h2>
33 <p>The function constructs sink for the specified console stream and adds it to the core</p>
34 <p>
35
36 </p>
37 <div class="variablelist"><table border="0" class="variablelist compact">
38 <colgroup>
39 <col align="left" valign="top">
40 <col>
41 </colgroup>
42 <tbody>
43 <tr>
44 <td><p><span class="term">Parameters:</span></p></td>
45 <td><div class="variablelist"><table border="0" class="variablelist compact">
46 <colgroup>
47 <col align="left" valign="top">
48 <col>
49 </colgroup>
50 <tbody>
51 <tr>
52 <td><p><span class="term"><code class="computeroutput">args</code></span></p></td>
53 <td>
54 <p>Optional additional named arguments for the sink initialization. The following arguments are supported: </p>
55 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
56 <li class="listitem"><p><code class="computeroutput">filter</code> Specifies a filter to install into the sink. May be a string that represents a filter, or a filter lambda expression. </p></li>
57 <li class="listitem"><p><code class="computeroutput">format</code> Specifies a formatter to install into the sink. May be a string that represents a formatter, or a formatter lambda expression (either streaming or Boost.Format-like notation). </p></li>
58 <li class="listitem"><p><code class="computeroutput">auto_flush</code> A boolean flag that shows whether the sink should automatically flush the stream after each written record. </p></li>
59 <li class="listitem"><p><code class="computeroutput">auto_newline_mode</code> - Specifies automatic trailing newline insertion mode. Must be a value of the <code class="computeroutput">auto_newline_mode</code> enum. By default, is <code class="computeroutput">auto_newline_mode::insert_if_missing</code>. </p></li>
60 </ul></div>
61 <p>
62 </p>
63 </td>
64 </tr>
65 <tr>
66 <td><p><span class="term"><code class="computeroutput">strm</code></span></p></td>
67 <td><p>One of the standard console streams: <code class="computeroutput">std::cout</code>, <code class="computeroutput">std::cerr</code> or <code class="computeroutput">std::clog</code> (or the corresponding wide-character analogues). </p></td>
68 </tr>
69 </tbody>
70 </table></div></td>
71 </tr>
72 <tr>
73 <td><p><span class="term">Returns:</span></p></td>
74 <td><p>Pointer to the constructed sink. </p></td>
75 </tr>
76 </tbody>
77 </table></div>
78 </div>
79 </div>
80 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
81 <td align="left"></td>
82 <td align="right"><div class="copyright-footer">Copyright &#169; 2007-2016 Andrey Semashev<p>
83         Distributed under the Boost Software License, Version 1.0. (See accompanying
84         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>).
85       </p>
86 </div></td>
87 </tr></table>
88 <hr>
89 <div class="spirit-nav">
90 <a accesskey="p" href="add_common_attributes.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../utilities.html#header.boost.log.utility.setup.console_hpp"><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="add_cons_idm45185961500960.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
91 </div>
92 </body>
93 </html>