i think it makes sense to use boost::singleton together with a boost::logger, so that all the objects in the executable can access the same logger and dump strings to it.
class logger_singleton
: public boost::mutexed_singleton<logger_singleton>
{
private
boost::logger blogger;
public:
logger_singleton(boost::restricted);
// public interface, e.g:
int log_this_string(const std::string &a){blogger->strm()<<a;}
};
has anyone ever tried this and what do you think about it?