• 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 template channel_logger</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.channel_logger_hpp" title="Header &lt;boost/log/sources/channel_logger.hpp&gt;">
9<link rel="prev" href="../../../BOOST_LOG_CHANNEL.html" title="Macro BOOST_LOG_CHANNEL">
10<link rel="next" href="channel_logger_mt.html" title="Class template channel_logger_mt">
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="../../../BOOST_LOG_CHANNEL.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../logging_sources.html#header.boost.log.sources.channel_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="channel_logger_mt.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
17</div>
18<div class="refentry">
19<a name="boost.log.sources.channel_logger"></a><div class="titlepage"></div>
20<div class="refnamediv">
21<h2><span class="refentrytitle">Class template channel_logger</span></h2>
22<p>boost::log::sources::channel_logger — Narrow-char logger. Functionally equivalent to <code class="computeroutput"><a class="link" href="basic_channel_logger.html" title="Class template basic_channel_logger">basic_channel_logger</a></code>. </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="../../../logging_sources.html#header.boost.log.sources.channel_logger_hpp" title="Header &lt;boost/log/sources/channel_logger.hpp&gt;">boost/log/sources/channel_logger.hpp</a>&gt;
26
27</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> ChannelT <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;</span>
28<span class="keyword">class</span> <a class="link" href="channel_logger.html" title="Class template channel_logger">channel_logger</a> <span class="special">:</span> <span class="keyword">public</span> basic_composite_logger&lt; char, channel_logger&lt; ChannelT &gt;, single_thread_model, features&lt; channel&lt; ChannelT &gt; &gt; &gt;
29<span class="special">{</span>
30<span class="keyword">public</span><span class="special">:</span>
31  <span class="comment">// <a class="link" href="channel_logger.html#boost.log.sources.channel_loggerconstruct-copy-destruct">construct/copy/destruct</a></span>
32  <a class="link" href="channel_logger.html#idm46079580644720-bb"><span class="identifier">channel_logger</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
33  <a class="link" href="channel_logger.html#idm46079580644016-bb"><span class="identifier">channel_logger</span></a><span class="special">(</span><a class="link" href="channel_logger.html" title="Class template channel_logger">channel_logger</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
34  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span><span class="special">...</span> ArgsT<span class="special">&gt;</span> <span class="keyword">explicit</span> <a class="link" href="channel_logger.html#idm46079580642336-bb"><span class="identifier">channel_logger</span></a><span class="special">(</span><span class="identifier">ArgsT</span><span class="special">...</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
35  <span class="keyword">explicit</span> <a class="link" href="channel_logger.html#idm46079580639520-bb"><span class="identifier">channel_logger</span></a><span class="special">(</span><span class="identifier">ChannelT</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
36  <a class="link" href="channel_logger.html" title="Class template channel_logger">channel_logger</a> <span class="special">&amp;</span> <a class="link" href="channel_logger.html#idm46079580637104-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="channel_logger.html" title="Class template channel_logger">channel_logger</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
37<span class="special">}</span><span class="special">;</span></pre></div>
38<div class="refsect1">
39<a name="idm44984869550896"></a><h2>Description</h2>
40<p>See <code class="computeroutput">channel</code> class template for a more detailed description </p>
41<div class="refsect2">
42<a name="idm44984869549440"></a><h3>
43<a name="boost.log.sources.channel_loggerconstruct-copy-destruct"></a><code class="computeroutput">channel_logger</code>
44        public
45       construct/copy/destruct</h3>
46<div class="orderedlist"><ol class="orderedlist" type="1">
47<li class="listitem">
48<pre class="literallayout"><a name="idm46079580644720-bb"></a><span class="identifier">channel_logger</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
49<p>Default constructor </p>
50</li>
51<li class="listitem">
52<pre class="literallayout"><a name="idm46079580644016-bb"></a><span class="identifier">channel_logger</span><span class="special">(</span><a class="link" href="channel_logger.html" title="Class template channel_logger">channel_logger</a> <span class="keyword">const</span> <span class="special">&amp;</span> that<span class="special">)</span><span class="special">;</span></pre>
53<p>Copy constructor </p>
54</li>
55<li class="listitem">
56<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span><span class="special">...</span> ArgsT<span class="special">&gt;</span> <span class="keyword">explicit</span> <a name="idm46079580642336-bb"></a><span class="identifier">channel_logger</span><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>
57<p>Constructor with named arguments </p>
58</li>
59<li class="listitem">
60<pre class="literallayout"><span class="keyword">explicit</span> <a name="idm46079580639520-bb"></a><span class="identifier">channel_logger</span><span class="special">(</span><span class="identifier">ChannelT</span> <span class="keyword">const</span> <span class="special">&amp;</span> channel<span class="special">)</span><span class="special">;</span></pre>
61<p>The constructor creates the logger with the specified channel name</p>
62<p>
63</p>
64<div class="variablelist"><table border="0" class="variablelist compact">
65<colgroup>
66<col align="left" valign="top">
67<col>
68</colgroup>
69<tbody><tr>
70<td><p><span class="term">Parameters:</span></p></td>
71<td><div class="variablelist"><table border="0" class="variablelist compact">
72<colgroup>
73<col align="left" valign="top">
74<col>
75</colgroup>
76<tbody><tr>
77<td><p><span class="term"><code class="computeroutput">channel</code></span></p></td>
78<td><p>The channel name </p></td>
79</tr></tbody>
80</table></div></td>
81</tr></tbody>
82</table></div>
83</li>
84<li class="listitem">
85<pre class="literallayout"><a class="link" href="channel_logger.html" title="Class template channel_logger">channel_logger</a> <span class="special">&amp;</span> <a name="idm46079580637104-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="channel_logger.html" title="Class template channel_logger">channel_logger</a> <span class="keyword">const</span> <span class="special">&amp;</span> that<span class="special">)</span><span class="special">;</span></pre>
86<p>Assignment operator</p>
87<p>Swaps two loggers </p>
88</li>
89</ol></div>
90</div>
91</div>
92</div>
93<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
94<td align="left"></td>
95<td align="right"><div class="copyright-footer">Copyright © 2007-2019 Andrey Semashev<p>
96        Distributed under the Boost Software License, Version 1.0. (See accompanying
97        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>).
98      </p>
99</div></td>
100</tr></table>
101<hr>
102<div class="spirit-nav">
103<a accesskey="p" href="../../../BOOST_LOG_CHANNEL.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../logging_sources.html#header.boost.log.sources.channel_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="channel_logger_mt.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
104</div>
105</body>
106</html>
107