</p>
<p>
Then, in order to register this type with the simple formatter factory,
- a single call to <code class="computeroutput"><a class="link" href="../../boost/log/register_idm45185961296096.html" title="Function template register_simple_formatter_factory">register_simple_formatter_factory</a></code>
+ a single call to <code class="computeroutput"><a class="link" href="../../boost/log/register_idm45711342896768.html" title="Function template register_simple_formatter_factory">register_simple_formatter_factory</a></code>
will suffice:
</p>
<p>
<p>
The simple formatter factory ignores all additional parameters from the
format string, so we have to implement our own factory instead. Custom
- factories are registered with the <code class="computeroutput"><a class="link" href="../../boost/log/register_idm45185961309152.html" title="Function template register_formatter_factory">register_formatter_factory</a></code>
- function, which is similar to <code class="computeroutput"><a class="link" href="../../boost/log/register_idm45185961296096.html" title="Function template register_simple_formatter_factory">register_simple_formatter_factory</a></code>
+ factories are registered with the <code class="computeroutput"><a class="link" href="../../boost/log/register_idm45711342909824.html" title="Function template register_formatter_factory">register_formatter_factory</a></code>
+ function, which is similar to <code class="computeroutput"><a class="link" href="../../boost/log/register_idm45711342896768.html" title="Function template register_simple_formatter_factory">register_simple_formatter_factory</a></code>
but accepts a pointer to the factory instead of the explicit template parameters.
</p>
<p>
empty if the value is not present.
</p>
<p>
- Lastly, the call to <code class="computeroutput"><a class="link" href="../../boost/log/register_idm45185961309152.html" title="Function template register_formatter_factory">register_formatter_factory</a></code>
+ Lastly, the call to <code class="computeroutput"><a class="link" href="../../boost/log/register_idm45711342909824.html" title="Function template register_formatter_factory">register_formatter_factory</a></code>
creates the factory and adds it to the library.
</p>
<p>
</li>
</ol></div>
<p>
- Naturally, all these operators must be visible from the point of the <code class="computeroutput"><a class="link" href="../../boost/log/register_idm45185961379152.html" title="Function template register_simple_filter_factory">register_simple_filter_factory</a></code>
+ Naturally, all these operators must be visible from the point of the <code class="computeroutput"><a class="link" href="../../boost/log/register_idm45711342979824.html" title="Function template register_simple_filter_factory">register_simple_filter_factory</a></code>
call. Note that unlike the simple formatter factory, the filter factory
requires the user's type to support reading from a stream. This is so because
the filter factory would have to parse the argument of the filter relation
<p>
</p>
<p>
- Having called the <code class="computeroutput"><a class="link" href="../../boost/log/register_idm45185961392400.html" title="Function template register_filter_factory">register_filter_factory</a></code>
+ Having called the <code class="computeroutput"><a class="link" href="../../boost/log/register_idm45711342993072.html" title="Function template register_filter_factory">register_filter_factory</a></code>
function, whenever the <a class="link" href="../detailed/utilities.html#log.detailed.utilities.setup.filter_formatter" title="Filter and formatter parsers">filter
parser</a> encounters the "Coordinates" attribute mentioned
in the filter, it will use the <code class="computeroutput"><span class="identifier">point_filter_factory</span></code>
and out custom "StatCollector" sink.
</p>
<p>
- After defining the factory we only have to register it with the <code class="computeroutput"><a class="link" href="../../boost/log/register_idm45185961246368.html" title="Function template register_sink_factory">register_sink_factory</a></code>
+ After defining the factory we only have to register it with the <code class="computeroutput"><a class="link" href="../../boost/log/register_idm45711342847040.html" title="Function template register_sink_factory">register_sink_factory</a></code>
call. The first argument is the new value of the "Destination"
parameter in the settings. Whenever the library finds sink description
with destination "StatCollector", our factory will be invoked