Boost.Test > Components > The Unit Test Framework > Components > The Test Log
Boost Test logo

The Test Log

Definition

defined in unit_test_log.hpp

Synopsis
class unit_test_log
{
    static unit_test_log& instance();
    void                  set_log_stream( std::ostream& str );
    void                  set_log_threshold_level_by_name( log_level lev );
    void                  set_log_format( std::string const& of );
};
Description

To manage the testing output stream the Unit Test Framework uses a singleton class unit_test_log. This class is responsible for managing and formatting testing log. There two formats supported for testing log: human readable format and XML format. In most cases you do not need to use this class interface directly. The framework provides a simple way to set the log level and log format from outside of the test program. For more details and for the list of acceptable values see the Framework parameters.

Construction

There is only one instance if this class automatically created by the framework at test startup. To access it use method unit_test_log::instance().