Boost C++ Libraries

PrevUpHomeNext

Function template init_log_to_console

boost::log::init_log_to_console

Synopsis

// In header: <boost/log/utility/init/to_console.hpp>


template<typename CharT, typename... ArgsT> 
  shared_ptr< sinks::synchronous_sink< sinks::basic_text_ostream_backend< CharT > >> 
  init_log_to_console(std::basic_ostream< CharT > & strm, 
                      ArgsT...const & args);

Description

The function constructs sink for the specified console stream and adds it to the core

Parameters:
args

Optional additional named arguments for the sink initialization. The following arguments are supported:

  • filter Specifies a filter to install into the sink. May be a string that represents a filter, or a filter lambda expression.

  • format Specifies a formatter to install into the sink. May be a string that represents a formatter, or a formatter lambda expression (either streaming or Boost.Format-like notation).

  • auto_flush A boolean flag that shows whether the sink should automaticallu flush the stream after each written record.

strm

One of the standard console streams: std::cout, std::cerr or std::clog (or the corresponding wide-character analogues).

Returns:

Pointer to the constructed sink.


PrevUpHomeNext