Boost Users :
Subject: [Boost-users] [Log] Get the streams in a text_ostream_backend derived class
From: Florian Lindner (mailinglists_at_[hidden])
Date: 2016-06-16 04:41:02
class StreamBackend : public boost::log::sinks::text_ostream_backend
and manually instantiate the backend and add a stream
boost::shared_ptr<StreamBackend> backend =
std::ofstream(some file name)));
using sink_t = boost::log::sinks::synchronous_sink<StreamBackend>;
boost::shared_ptr<sink_t> sink(new sink_t(backend));
All I want is to overwrite the consume function in the derived class.
Since I want to retain the original functionality as far as possible, I
would like to work on the streams added add_streams. Problem is that the
m_pImpl->m_Streams vector in the implementation is private and there is
no method to get the added streams.
What is the best way to go here?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net