1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Class template basic_composite_logger<CharT, FinalT, single_thread_model, FeaturesT></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 1. Boost.Log v2"> 8<link rel="up" href="../../../logging_sources.html#header.boost.log.sources.basic_logger_hpp" title="Header <boost/log/sources/basic_logger.hpp>"> 9<link rel="prev" href="basic_composite_logger.html" title="Class template basic_composite_logger"> 10<link rel="next" href="basic_logger.html" title="Class template basic_logger"> 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="basic_composite_logger.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../logging_sources.html#header.boost.log.sources.basic_logger_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="basic_logger.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> 17</div> 18<div class="refentry"> 19<a name="boost.log.sources.basic_co_idm46079580295792"></a><div class="titlepage"></div> 20<div class="refnamediv"> 21<h2><span class="refentrytitle">Class template basic_composite_logger<CharT, FinalT, single_thread_model, FeaturesT></span></h2> 22<p>boost::log::sources::basic_composite_logger<CharT, FinalT, single_thread_model, FeaturesT> — An optimized composite logger version with no multithreading support. </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: <<a class="link" href="../../../logging_sources.html#header.boost.log.sources.basic_logger_hpp" title="Header <boost/log/sources/basic_logger.hpp>">boost/log/sources/basic_logger.hpp</a>> 26 27</span><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> FinalT<span class="special">,</span> <span class="keyword">typename</span> FeaturesT<span class="special">></span> 28<span class="keyword">class</span> <a class="link" href="basic_co_idm46079580295792.html" title="Class template basic_composite_logger<CharT, FinalT, single_thread_model, FeaturesT>">basic_composite_logger</a><span class="special"><</span><span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">FinalT</span><span class="special">,</span> <span class="identifier">single_thread_model</span><span class="special">,</span> <span class="identifier">FeaturesT</span><span class="special">></span> <span class="special">{</span> 29<span class="keyword">public</span><span class="special">:</span> 30 <span class="comment">// types</span> 31 <span class="keyword">typedef</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">threading_model</span> <a name="boost.log.sources.basic_co_idm46079580295792.threading_model"></a><span class="identifier">threading_model</span><span class="special">;</span> 32 33 <span class="comment">// <a class="link" href="basic_co_idm46079580295792.html#boost.log.sources.basic_co_idm46079580295792construct-copy-destruct">construct/copy/destruct</a></span> 34 <a class="link" href="basic_co_idm46079580295792.html#idm46079580402000-bb"><span class="identifier">basic_composite_logger</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> 35 <a class="link" href="basic_co_idm46079580295792.html#idm46079580401712-bb"><span class="identifier">basic_composite_logger</span></a><span class="special">(</span><a class="link" href="basic_composite_logger.html" title="Class template basic_composite_logger">basic_composite_logger</a> <span class="keyword">const</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> 36 <a class="link" href="basic_co_idm46079580295792.html#idm46079580400448-bb"><span class="identifier">basic_composite_logger</span></a><span class="special">(</span>logger_base <span class="special">&&</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_nothrow_move_constructible</span><span class="special"><</span> <span class="identifier">base_type</span> <span class="special">></span><span class="special">::</span><span class="identifier">value</span><span class="special">)</span><span class="special">)</span><span class="special">;</span> 37 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> ArgsT<span class="special">></span> <span class="keyword">explicit</span> <a class="link" href="basic_co_idm46079580295792.html#idm46079580398944-bb"><span class="identifier">basic_composite_logger</span></a><span class="special">(</span><span class="identifier">ArgsT</span> <span class="keyword">const</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> 38 39 <span class="comment">// <a class="link" href="basic_co_idm46079580295792.html#idm46079580290944-bb">public member functions</a></span> 40 <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span> <span class="identifier">attribute_set</span><span class="special">::</span><span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">bool</span> <span class="special">></span> 41 <a class="link" href="basic_co_idm46079580295792.html#idm46079580290384-bb"><span class="identifier">add_attribute</span></a><span class="special">(</span><span class="identifier">attribute_name</span> <span class="keyword">const</span> <span class="special">&</span><span class="special">,</span> <span class="identifier">attribute</span> <span class="keyword">const</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> 42 <span class="keyword">void</span> <a class="link" href="basic_co_idm46079580295792.html#idm46079580288128-bb"><span class="identifier">remove_attribute</span></a><span class="special">(</span><span class="identifier">attribute_set</span><span class="special">::</span><span class="identifier">iterator</span><span class="special">)</span><span class="special">;</span> 43 <span class="keyword">void</span> <a class="link" href="basic_co_idm46079580295792.html#idm46079580286592-bb"><span class="identifier">remove_all_attributes</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> 44 <span class="identifier">attribute_set</span> <a class="link" href="basic_co_idm46079580295792.html#idm46079580285744-bb"><span class="identifier">get_attributes</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 45 <span class="keyword">void</span> <a class="link" href="basic_co_idm46079580295792.html#idm46079580410288-bb"><span class="identifier">set_attributes</span></a><span class="special">(</span><span class="identifier">attribute_set</span> <span class="keyword">const</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> 46 <span class="identifier">record</span> <a class="link" href="basic_co_idm46079580295792.html#idm46079580408752-bb"><span class="identifier">open_record</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> 47 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> ArgsT<span class="special">></span> <span class="identifier">record</span> <a class="link" href="basic_co_idm46079580295792.html#idm46079580407904-bb"><span class="identifier">open_record</span></a><span class="special">(</span><span class="identifier">ArgsT</span> <span class="keyword">const</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> 48 <span class="keyword">void</span> <a class="link" href="basic_co_idm46079580295792.html#idm46079580405520-bb"><span class="identifier">push_record</span></a><span class="special">(</span><span class="identifier">record</span> <span class="special">&&</span><span class="special">)</span><span class="special">;</span> 49 <span class="keyword">void</span> <a class="link" href="basic_co_idm46079580295792.html#idm46079580403984-bb"><span class="identifier">swap</span></a><span class="special">(</span><a class="link" href="basic_composite_logger.html" title="Class template basic_composite_logger">basic_composite_logger</a> <span class="special">&</span><span class="special">)</span><span class="special">;</span> 50 51 <span class="comment">// <a class="link" href="basic_co_idm46079580295792.html#idm46079580396848-bb">protected member functions</a></span> 52 <span class="identifier">FinalT</span> <span class="special">&</span> <a class="link" href="basic_co_idm46079580295792.html#idm46079580396272-bb"><span class="identifier">assign</span></a><span class="special">(</span><span class="identifier">FinalT</span><span class="special">)</span><span class="special">;</span> 53<span class="special">}</span><span class="special">;</span></pre></div> 54<div class="refsect1"> 55<a name="idm44984870624928"></a><h2>Description</h2> 56<div class="refsect2"> 57<a name="idm44984870624512"></a><h3> 58<a name="boost.log.sources.basic_co_idm46079580295792construct-copy-destruct"></a><code class="computeroutput">basic_composite_logger</code> 59 public 60 construct/copy/destruct</h3> 61<div class="orderedlist"><ol class="orderedlist" type="1"> 62<li class="listitem"><pre class="literallayout"><a name="idm46079580402000-bb"></a><span class="identifier">basic_composite_logger</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li> 63<li class="listitem"><pre class="literallayout"><a name="idm46079580401712-bb"></a><span class="identifier">basic_composite_logger</span><span class="special">(</span><a class="link" href="basic_composite_logger.html" title="Class template basic_composite_logger">basic_composite_logger</a> <span class="keyword">const</span> <span class="special">&</span> that<span class="special">)</span><span class="special">;</span></pre></li> 64<li class="listitem"><pre class="literallayout"><a name="idm46079580400448-bb"></a><span class="identifier">basic_composite_logger</span><span class="special">(</span>logger_base <span class="special">&&</span> that<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_nothrow_move_constructible</span><span class="special"><</span> <span class="identifier">base_type</span> <span class="special">></span><span class="special">::</span><span class="identifier">value</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre></li> 65<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> ArgsT<span class="special">></span> <span class="keyword">explicit</span> <a name="idm46079580398944-bb"></a><span class="identifier">basic_composite_logger</span><span class="special">(</span><span class="identifier">ArgsT</span> <span class="keyword">const</span> <span class="special">&</span> args<span class="special">)</span><span class="special">;</span></pre></li> 66</ol></div> 67</div> 68<div class="refsect2"> 69<a name="idm44984870592272"></a><h3> 70<a name="idm46079580290944-bb"></a><code class="computeroutput">basic_composite_logger</code> public member functions</h3> 71<div class="orderedlist"><ol class="orderedlist" type="1"> 72<li class="listitem"><pre class="literallayout"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span> <span class="identifier">attribute_set</span><span class="special">::</span><span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">bool</span> <span class="special">></span> 73<a name="idm46079580290384-bb"></a><span class="identifier">add_attribute</span><span class="special">(</span><span class="identifier">attribute_name</span> <span class="keyword">const</span> <span class="special">&</span> name<span class="special">,</span> <span class="identifier">attribute</span> <span class="keyword">const</span> <span class="special">&</span> attr<span class="special">)</span><span class="special">;</span></pre></li> 74<li class="listitem"><pre class="literallayout"><span class="keyword">void</span> <a name="idm46079580288128-bb"></a><span class="identifier">remove_attribute</span><span class="special">(</span><span class="identifier">attribute_set</span><span class="special">::</span><span class="identifier">iterator</span> it<span class="special">)</span><span class="special">;</span></pre></li> 75<li class="listitem"><pre class="literallayout"><span class="keyword">void</span> <a name="idm46079580286592-bb"></a><span class="identifier">remove_all_attributes</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li> 76<li class="listitem"><pre class="literallayout"><span class="identifier">attribute_set</span> <a name="idm46079580285744-bb"></a><span class="identifier">get_attributes</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li> 77<li class="listitem"><pre class="literallayout"><span class="keyword">void</span> <a name="idm46079580410288-bb"></a><span class="identifier">set_attributes</span><span class="special">(</span><span class="identifier">attribute_set</span> <span class="keyword">const</span> <span class="special">&</span> attrs<span class="special">)</span><span class="special">;</span></pre></li> 78<li class="listitem"><pre class="literallayout"><span class="identifier">record</span> <a name="idm46079580408752-bb"></a><span class="identifier">open_record</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li> 79<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> ArgsT<span class="special">></span> <span class="identifier">record</span> <a name="idm46079580407904-bb"></a><span class="identifier">open_record</span><span class="special">(</span><span class="identifier">ArgsT</span> <span class="keyword">const</span> <span class="special">&</span> args<span class="special">)</span><span class="special">;</span></pre></li> 80<li class="listitem"><pre class="literallayout"><span class="keyword">void</span> <a name="idm46079580405520-bb"></a><span class="identifier">push_record</span><span class="special">(</span><span class="identifier">record</span> <span class="special">&&</span> rec<span class="special">)</span><span class="special">;</span></pre></li> 81<li class="listitem"><pre class="literallayout"><span class="keyword">void</span> <a name="idm46079580403984-bb"></a><span class="identifier">swap</span><span class="special">(</span><a class="link" href="basic_composite_logger.html" title="Class template basic_composite_logger">basic_composite_logger</a> <span class="special">&</span> that<span class="special">)</span><span class="special">;</span></pre></li> 82</ol></div> 83</div> 84<div class="refsect2"> 85<a name="idm44984870529232"></a><h3> 86<a name="idm46079580396848-bb"></a><code class="computeroutput">basic_composite_logger</code> protected member functions</h3> 87<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><pre class="literallayout"><span class="identifier">FinalT</span> <span class="special">&</span> <a name="idm46079580396272-bb"></a><span class="identifier">assign</span><span class="special">(</span><span class="identifier">FinalT</span> that<span class="special">)</span><span class="special">;</span></pre></li></ol></div> 88</div> 89</div> 90</div> 91<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 92<td align="left"></td> 93<td align="right"><div class="copyright-footer">Copyright © 2007-2019 Andrey Semashev<p> 94 Distributed under the Boost Software License, Version 1.0. (See accompanying 95 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>). 96 </p> 97</div></td> 98</tr></table> 99<hr> 100<div class="spirit-nav"> 101<a accesskey="p" href="basic_composite_logger.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../logging_sources.html#header.boost.log.sources.basic_logger_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="basic_logger.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> 102</div> 103</body> 104</html> 105