#include <test_helper.hpp>
Definition at line 28 of file test_helper.hpp.
◆ LogOutputCollector()
openvpn::LogOutputCollector::LogOutputCollector |
( |
| ) |
|
|
inline |
◆ getOutput()
std::string openvpn::LogOutputCollector::getOutput |
( |
| ) |
const |
|
inline |
Return the collected log out
- Returns
- the log output as string
Definition at line 50 of file test_helper.hpp.
◆ getStream()
std::ostream & openvpn::LogOutputCollector::getStream |
( |
| ) |
|
|
inline |
Allow to access the underlying output stream to direct output from function that want to write to a stream to it
- Returns
- that will be captured by this log
Definition at line 60 of file test_helper.hpp.
◆ isStdoutEnabled()
bool openvpn::LogOutputCollector::isStdoutEnabled |
( |
| ) |
const |
|
inline |
Return current state of stdout output
- Returns
- current state of output
Definition at line 78 of file test_helper.hpp.
◆ log()
void openvpn::LogOutputCollector::log |
( |
const std::string & |
l | ) |
|
|
inlineoverridevirtual |
◆ log_wrapper()
◆ setPrintOutput()
void openvpn::LogOutputCollector::setPrintOutput |
( |
bool |
doOutput | ) |
|
|
inline |
Changes if the logging to stdout should be done
- Parameters
-
Definition at line 69 of file test_helper.hpp.
◆ startCollecting()
void openvpn::LogOutputCollector::startCollecting |
( |
| ) |
|
|
inline |
Starts collecting log output. This will also disable stdout output and clear the collected output if there is any
Definition at line 87 of file test_helper.hpp.
◆ stopCollecting()
std::string openvpn::LogOutputCollector::stopCollecting |
( |
| ) |
|
|
inline |
Stops collecting log output. Will reenable stdout output.
- Returns
- the output collected
Definition at line 100 of file test_helper.hpp.
◆ collect_log
bool openvpn::LogOutputCollector::collect_log = false |
|
private |
◆ log_context
◆ log_wrap
◆ mutex
std::mutex openvpn::LogOutputCollector::mutex {} |
|
private |
◆ out
std::stringstream openvpn::LogOutputCollector::out |
|
private |
◆ output_log
bool openvpn::LogOutputCollector::output_log = true |
|
private |
The documentation for this class was generated from the following file: