I have created a very simple test program based off the boost.log tutorial:
#include <boost/log/trivial.hpp>
#define LOG_TRACE BOOST_LOG_TRIVIAL(trace)
#define LOG_DEBUG BOOST_LOG_TRIVIAL(debug)
#define LOG_INFO BOOST_LOG_TRIVIAL(info)
#define LOG_WARN BOOST_LOG_TRIVIAL(warning)
#define LOG_ERR BOOST_LOG_TRIVIAL(error)
#define LOG_FATAL BOOST_LOG_TRIVIAL(fatal)
int
main(int argc,
const char *argv[])
{
LOG_TRACE << "A trace severity message";
LOG_DEBUG << "A debug severity message";
LOG_INFO << "An informational severity message";
LOG_WARN << "A warning severity message";
LOG_ERR << "An error severity message";
LOG_FATAL << "A fatal severity message";
return 0;
}
When I run this under valgrind, it produces 7 loss records, which is consistent with the results that I see in more complex programs using boost.log. Does anybody know of any way to eliminate these leaks, or do I just need to suppress them?