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

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Class template basic_debug_output_backend

boost::log::sinks::basic_debug_output_backend — An implementation of a logging sink backend that outputs to the debugger.

Synopsis

// In header: <boost/log/sinks/debug_output_backend.hpp>

template<typename CharT> 
class basic_debug_output_backend :
  public basic_formatted_sink_backend< CharT, concurrent_feeding >
{
public:
  // types
  typedef base_type::char_type   char_type;    // Character type. 
  typedef base_type::string_type string_type;  // String type to be used as a message text holder. 

  // construct/copy/destruct
  basic_debug_output_backend();
  ~basic_debug_output_backend();

  // public member functions
  void consume(record_view const &, string_type const &);
};

Description

The sink uses Windows API in order to write log records as debug messages, if the application process is run under debugger. The sink backend also provides a specific filter that allows to check whether the debugger is available and thus elide unnecessary formatting.

basic_debug_output_backend public construct/copy/destruct

  1. basic_debug_output_backend();

    Constructor. Initializes the sink backend.

  2. ~basic_debug_output_backend();

    Destructor

basic_debug_output_backend public member functions

  1. void consume(record_view const & rec, string_type const & formatted_message);

    The method passes the formatted message to debugger


PrevUpHomeNext