Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12364: In boost::log, how to re-connect to a remote server (like logstash)?
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-07-30 00:47:51
#12364: In boost::log, how to re-connect to a remote server (like logstash)?
-------------------------------+---------------------
Reporter: xinyan.zhang@⦠| Owner: andysem
Type: Support Requests | Status: closed
Milestone: To Be Determined | Component: log
Version: Boost 1.61.0 | Severity: Problem
Resolution: invalid | Keywords:
-------------------------------+---------------------
Changes (by andysem):
* status: new => closed
* resolution: => invalid
Comment:
Boost.Log does not provide a network-based sink out of the box and the
closest you can get with the available components is with
`text_ostream_backend` and `tcp::iostream`. I'm not familiar with
`tcp::iostream` but I suspect the stream obtains bad `iostate` when the
connection is closed. If so, you can unmask exceptions in the stream and
then use
[http://www.boost.org/doc/libs/1_61_0/libs/log/doc/html/log/detailed/sink_frontends.html#log.detailed.sink_frontends.basic_services.exception_handling
exception handlers] to reconnect. Please refer to Boost.ASIO documentation
to verify that.
You can also implement your own
[http://www.boost.org/doc/libs/1_61_0/libs/log/doc/html/log/extension.html#log.extension.sinks.minimalistic_sink_backend
sink backend] where you can use the socket directly.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12364#comment:1> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC