I am using the boost unit test framework. I use the BOOST_TEST_MESSAGE
function, and therefore I need to set the log level to at least message
.
From reading the doc, I can do the following:
- I can add somehwere
boost::unit_test::unit_test_log.set_threshold_level( boost::unit_test::log_messages);
However, the doc indicates it to be generally considered bad practice. - I can set the environment variable
BOOST_TEST_LOG_LEVEL
appropriately. This is a bad solution for me, as I will distribute my code, and I do not have a good way to constrain the user to set this environment variable appropriately in their bashrc.
Does anyone know a proper solution to this?
Aucun commentaire:
Enregistrer un commentaire