MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / InitLoggerOstream

Function InitLoggerOstream

Tools/Log.cpp:87–96  ·  view source on GitHub ↗

-------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

85
86 //-------------------------------------------------------------------------
87 void InitLoggerOstream(const boost::shared_ptr<std::ostringstream>& ostr)
88 {
89 typedef sinks::synchronous_sink<sinks::text_ostream_backend> text_sink;
90 auto sink = boost::make_shared<text_sink>();
91 auto backend = sink->locked_backend();
92
93 backend->add_stream(ostr);
94 backend->auto_flush(true);
95 SetLogSink(sink);
96 }
97}

Callers 1

SetUpMethod · 0.85

Calls 1

SetLogSinkFunction · 0.85

Tested by 1

SetUpMethod · 0.68