Hi,
I need to integrate some loggin into my unit to some extend bein
integration tests (hardware).
How best to call this function which sets up boost logging
void init() {
boost::log::add_file_log("sample.log");
boost::log::core::get()->set_filter
(
boost::log::trivial::severity >= boost::log::trivial::info
);
}
if I have a test Runner looking like:
#define BOOST_TEST_MODULE MasterTestSuite
#include
After some more web search I did find a solution:
struct Init {
Init() {
boost::log::add_file_log("sample.log");
boost::log::core::get()->set_filter
(
boost::log::trivial::severity >= boost::log::trivial::info
);
}
~Init() {}
};
BOOST_GLOBAL_FIXTURE(Init);
Thank you.
On 19 September 2014 09:02, Witold E Wolski
Hi,
I need to integrate some loggin into my unit to some extend bein integration tests (hardware).
How best to call this function which sets up boost logging
void init() {
boost::log::add_file_log("sample.log");
boost::log::core::get()->set_filter ( boost::log::trivial::severity >= boost::log::trivial::info ); }
if I have a test Runner looking like:
#define BOOST_TEST_MODULE MasterTestSuite #include
Is there a way not have to add the suites manually
Thanks.
-- Witold Eryk Wolski
-- Witold Eryk Wolski
participants (1)
-
Witold E Wolski