preCICE v3.1.2
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
precice::logging::StreamBackend Class Referencefinal

A simple backends that outputs the message to a stream. More...

Inheritance diagram for precice::logging::StreamBackend:
[legend]
Collaboration diagram for precice::logging::StreamBackend:
[legend]

Public Member Functions

 StreamBackend (boost::shared_ptr< std::ostream > ostream)
 
void consume (boost::log::record_view const &rec, string_type const &formatted_record)
 

Private Attributes

boost::shared_ptr< std::ostream_ostream
 

Detailed Description

A simple backends that outputs the message to a stream.

Rationale: The original text_ostream_backend from boost suffered from the great amount of code that lies between the printing of the message and the endline. This leads to high probability that a process switch occurs and the message is severed from the endline.

Definition at line 109 of file LogConfiguration.cpp.

Constructor & Destructor Documentation

◆ StreamBackend()

precice::logging::StreamBackend::StreamBackend ( boost::shared_ptr< std::ostream > ostream)
inlineexplicit

Definition at line 114 of file LogConfiguration.cpp.

Member Function Documentation

◆ consume()

void precice::logging::StreamBackend::consume ( boost::log::record_view const & rec,
string_type const & formatted_record )
inline

Definition at line 117 of file LogConfiguration.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _ostream

boost::shared_ptr<std::ostream> precice::logging::StreamBackend::_ostream
private

Definition at line 111 of file LogConfiguration.cpp.


The documentation for this class was generated from the following file: