Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Custom log format support

It is possible to implement your own formatter: it should derive from boost::unit_test::unit_test_log_formatter.

It is possible to add a your own instance of a formatter to the set of formats using one of the two functions:

boost::unit_test::unit_test_log.set_formatter( unit_test_log_formatter* );
boost::unit_test::unit_test_log.add_formatter( unit_test_log_formatter* );
[Tip] Tip

See boost::unit_test::unit_test_log_t::set_formatter and boost::unit_test::unit_test_log_t::add_formatter for more details

[Warning] Warning

The call to boost::unit_test::unit_test_log.set_formatter is equivalent to boost::unit_test::unit_test_log_t::set_format (see here) as it disables all other formatters.

[Tip] Tip

More details about the class implementing the formatting of the logs can be found in the following reference sections:


PrevUpHomeNext