Boost C++ Libraries

PrevUpHomeNext

Class template unlocked_sink

boost::log::sinks::unlocked_sink — Non-blocking logging sink frontend.

Synopsis

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

template<typename SinkBackendT> 
class unlocked_sink : public unlocked_frontend< SinkBackendT::char_type > {
public:
  // types
  typedef SinkBackendT                    sink_backend_type;   // Sink implementation type. 
  typedef base_type::record_type          record_type;         // Log record type. 
  typedef base_type::string_type          string_type;         // String type to be used as a message text holder. 
  typedef shared_ptr< sink_backend_type > locked_backend_ptr;  // A type of pointer to the backend. 

  // construct/copy/destruct
  unlocked_sink();
  explicit unlocked_sink(shared_ptr< sink_backend_type > const &);

  // public member functions
  locked_backend_ptr locked_backend() const;
};

Description

The sink frontend does not perform thread synchronization and simply passes logging records to the sink backend.

unlocked_sink public construct/copy/destruct

  1. unlocked_sink();

    Default constructor. Constructs the sink backend instance. Requires the backend to be default-constructible.

  2. explicit unlocked_sink(shared_ptr< sink_backend_type > const & backend);

    Constructor attaches user-constructed backend instance

    Parameters:
    backend

    Pointer to the backend instance

    Requires:

    backend is not NULL.

unlocked_sink public member functions

  1. locked_backend_ptr locked_backend() const;

    Locking accessor to the attached backend


PrevUpHomeNext