3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Function template register_sink_factory</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="../../utilities.html#header.boost.log.utility.setup.from_settings_hpp" title="Header <boost/log/utility/setup/from_settings.hpp>">
9 <link rel="prev" href="register_sink__idp49678448.html" title="Function template register_sink_factory">
10 <link rel="next" href="register_sink__idp49690048.html" title="Function template register_sink_factory">
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>
15 <div class="spirit-nav">
16 <a accesskey="p" href="register_sink__idp49678448.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../utilities.html#header.boost.log.utility.setup.from_settings_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="register_sink__idp49690048.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
18 <div class="refentry">
19 <a name="boost.log.register_sink__idp49684288"></a><div class="titlepage"></div>
20 <div class="refnamediv">
21 <h2><span class="refentrytitle">Function template register_sink_factory</span></h2>
22 <p>boost::log::register_sink_factory — The function registers a factory for a custom sink. </p>
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="../../utilities.html#header.boost.log.utility.setup.from_settings_hpp" title="Header <boost/log/utility/setup/from_settings.hpp>">boost/log/utility/setup/from_settings.hpp</a>>
28 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> CharT<span class="special">></span>
29 <span class="keyword">void</span> <span class="identifier">register_sink_factory</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">const</span> <span class="special">&</span> sink_name<span class="special">,</span>
30 <span class="identifier">shared_ptr</span><span class="special"><</span> <a class="link" href="sink_factory.html" title="Struct template sink_factory">sink_factory</a><span class="special"><</span> <span class="identifier">CharT</span> <span class="special">></span> <span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> factory<span class="special">)</span><span class="special">;</span></pre></div>
31 <div class="refsect1">
32 <a name="idp127448720"></a><h2>Description</h2>
33 <p>The function registers a factory for a sink. The factory will be called to create sink instance when the parser discovers the specified sink type in the settings file. The factory must accept a map of parameters [parameter name -> parameter value] that it may use to initialize the sink. The factory must return a non-NULL pointer to the constructed sink instance.</p>
36 <div class="variablelist"><table border="0" class="variablelist compact">
38 <col align="left" valign="top">
42 <td><p><span class="term">Parameters:</span></p></td>
43 <td><div class="variablelist"><table border="0" class="variablelist compact">
45 <col align="left" valign="top">
50 <td><p><span class="term"><code class="computeroutput">factory</code></span></p></td>
51 <td><p>Pointer to the custom sink factory. Must not be NULL. </p></td>
54 <td><p><span class="term"><code class="computeroutput">sink_name</code></span></p></td>
55 <td><p>The custom sink name </p></td>
63 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
64 <td align="left"></td>
65 <td align="right"><div class="copyright-footer">Copyright © 2007-2016 Andrey Semashev<p>
66 Distributed under the Boost Software License, Version 1.0. (See accompanying
67 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>).
72 <div class="spirit-nav">
73 <a accesskey="p" href="register_sink__idp49678448.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../utilities.html#header.boost.log.utility.setup.from_settings_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="register_sink__idp49690048.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>