|  | Home | Libraries | People | FAQ | More | 
The select at compile time the log format from the list of the formats supplied by the Unit Test Framework
boost::unit_test::unit_test_log.set_format( boost::unit_test::output_format );
or for adding a format:
boost::unit_test::unit_test_log.add_format( boost::unit_test::output_format );
| ![[Caution]](../../../../../../../doc/src/images/caution.png) | Caution | 
|---|---|
| 
             | 
| ![[Tip]](../../../../../../../doc/src/images/tip.png) | Tip | 
|---|---|
| 
            See  | 
          In regular circumstances you shouldn't use this interface. Prefer to use
          runtime parameters --log_format
          or --logger
          for predefined log format selection.
        
| Code | 
|---|
| #define BOOST_TEST_MODULE example #include <boost/test/included/unit_test.hpp> using namespace boost::unit_test; struct MyConfig { MyConfig() { unit_test_log.set_format( OF_XML ); } ~MyConfig() {} }; BOOST_TEST_GLOBAL_CONFIGURATION( MyConfig ); BOOST_AUTO_TEST_CASE( test_case0 ) { BOOST_TEST( false ); } | 
| Output | 
|---|
| > example --report_level=no <TestLog><Error file="test.cpp" line="23">check false failed</Error></TestLog> |