Hello,
I have
class StreamBackend : public boost::log::sinks::text_ostream_backend
and manually instantiate the backend and add a stream
boost::shared_ptr<StreamBackend> backend =
boost::make_shared<StreamBackend>();
backend->add_stream(boost::shared_ptrstd::ostream(new
std::ofstream(some file name)));
using sink_t = boost::log::sinks::synchronous_sink<StreamBackend>;
boost::shared_ptr sink(new sink_t(backend));
sink->set_formatter(config.second.format);
sink->set_filter(config.second.filter);
boost::log::core::get()->add_sink(sink);
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?
Thanks,
Florian