add an other fairmq logger implementation in case boost version < 1.56 for backward compability

This commit is contained in:
winckler
2015-09-21 12:07:47 +02:00
committed by Mohammad Al-Turany
parent 74f7c5873a
commit ca7a76110d
4 changed files with 274 additions and 3 deletions

View File

@@ -46,7 +46,9 @@ void init_log_console()
typedef sinks::synchronous_sink<sinks::text_ostream_backend> text_sink;
boost::shared_ptr<text_sink> sink = boost::make_shared<text_sink>();
// add "console" output stream to our sink
sink->locked_backend()->add_stream(boost::shared_ptr<std::ostream>(&std::clog, boost::null_deleter()));
//sink->locked_backend()->add_stream(boost::shared_ptr<std::ostream>(&std::clog, boost::null_deleter()));
sink->locked_backend()->add_stream(boost::shared_ptr<std::ostream>(&std::clog));
// specify the format of the log message
sink->set_formatter(&init_log_formatter<tag_console>);
// add sink to the core