boost::logging::gather Namespace Reference

Classes that implement gathering the message. More...


struct  out_base
 In case your gather class returns anything else than a std::basic_ostream, that returned class must derive from this. More...


namespace  ostream_like
 Gathering the message: Allows you to write to a log using the cool "<<" operator.

Detailed Description

Classes that implement gathering the message.

A class that implements gathering the message needs 2 things:

Implementing a gather class is rather easy, here's a simple example:

    struct return_str {
        typedef std::basic_ostringstream<char_type> stream_type;

        stream_type & out() { return m_out; }
        std::basic_string<char_type> msg() { return m_out.str(); }
        stream_type m_out;

See also:

Copyright John Torjo © 2007
Have a question/ suggestion/ comment? Send me feedback