tlx
LoggerCollectOutput Class Reference

Class to hook logger output in the local thread. More...

#include <core.hpp>

Inheritance diagram for LoggerCollectOutput:
LoggerOutputHook

Public Member Functions

 LoggerCollectOutput (bool echo=false)
 
 ~LoggerCollectOutput ()
 
std::string get ()
 return transcript of log More...
 
void clear ()
 clear transcript More...
 
void append_log_line (const std::string &line) final
 method the receive log lines More...
 
- Public Member Functions inherited from LoggerOutputHook
virtual ~LoggerOutputHook ()
 virtual destructor More...
 

Protected Attributes

LoggerOutputHooknext_
 previous logger, will be restored by destructor More...
 
bool echo_
 whether to echo each line to next logger output More...
 
std::ostringstream oss_
 string stream collecting More...
 

Detailed Description

Class to hook logger output in the local thread.

Definition at line 201 of file core.hpp.

Constructor & Destructor Documentation

LoggerCollectOutput ( bool  echo = false)
explicit

Definition at line 118 of file core.cpp.

Definition at line 123 of file core.cpp.

Member Function Documentation

void append_log_line ( const std::string &  line)
finalvirtual

method the receive log lines

Implements LoggerOutputHook.

Definition at line 136 of file core.cpp.

void clear ( )

clear transcript

Definition at line 128 of file core.cpp.

std::string get ( )

return transcript of log

Definition at line 132 of file core.cpp.

Member Data Documentation

bool echo_
protected

whether to echo each line to next logger output

Definition at line 221 of file core.hpp.

LoggerOutputHook* next_
protected

previous logger, will be restored by destructor

Definition at line 218 of file core.hpp.

std::ostringstream oss_
protected

string stream collecting

Definition at line 224 of file core.hpp.


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